Opened 9 years ago
Last modified 9 years ago
#15227 new defect
On Ubuntu 14.04 host Windows 7 guest crashes when copying a few MB to shared clipboard
Reported by: | muzso | Owned by: | |
---|---|---|---|
Component: | clipboard | Version: | VirtualBox 5.0.16 |
Keywords: | Cc: | ||
Guest type: | Windows | Host type: | Linux |
Description
I've upgraded to VB 5.0.16 this morning and ever since I copy a larger amount of data (simple US ASCII text, a few megabytes) to the shared clipboard on the guest, the latter one crashes.
I'm using an Ubuntu 14.04 (fully updated) host and a Windows 7 guest (fully updated). The guest has the new (5.0.16) Guest Additions, which was installed using Windows Safe Mode so I could install basic 3D acceleration as well.
The VB log has nothing regarding the crash (meaning that it simply cuts off). It ends like this: 00:01:52.297240 RTC: period=0x20 (32) 1024 Hz 00:01:52.311908 RTC: period=0x200 (512) 64 Hz 00:01:56.312957 RTC: period=0x20 (32) 1024 Hz 00:01:56.327648 RTC: period=0x200 (512) 64 Hz 00:02:00.328344 RTC: period=0x20 (32) 1024 Hz
The host's syslog (and kern.log) does have some useful info: Mar 9 18:20:51 mydesktop kernel: [29070.988917] SHCLIP[27199]: segfault at 7f714c3ab5a8 ip 00007f7286ee6e0c sp 00007f7243ffece8 error 4 in libc-2.19.so[7f7286e64000+1bb000] Mar 9 18:20:51 mydesktop kernel: [29071.180556] vboxnetflt: 0 out of 32992 packets were not sent (directed to host)
I haven't had any VB crashes for a long time, but since the 5.0.14 -> 5.0.16 upgrade using the clipboard became a russian roulette. :(
Change History (9)
comment:1 by , 9 years ago
comment:4 by , 9 years ago
Actually downgrading VB to 5.0.14 didn't help either. :( Forgot to mention: both my host and guest are running 64 bit versions of their respective OS.
comment:5 by , 9 years ago
I've narrowed the test case down a bit further. Actually a lot further. :-)
The crash depends on the text editor I use in the host OS to paste into. If I paste into gedit or Eclipse IDE or LibreOffice Writer, nothing happens (regardless the amount of text pasted).
If I paste the contents of the shared clipboard into jEdit (my text editor of choice) in the host OS and the size of the text is above 260 KB (266240 bytes), the VM with the guest OS crashes. If the size of the text is below 259 KB (265216 bytes), then the VM survives without crashing.
The limit (from which upwards the crash starts to occur) lies somewhere between these two values.
Quite strange. :o
And now I've a fix repro for the issue. :-)
comment:6 by , 9 years ago
I've reproduced the problem on a different PC (different hardware, different installation of Ubuntu host OS and Windows 7 guest OS), but the software versions are all the same.
The common items between the two environments are:
- both run Ubuntu 14.04 64-bit as host OS
- both run Windows 7 64-bit as guest OS
- in both cases I could only reproduce the issue while pasting the contents of the shared clipboard into jEdit (package: 5.1.0+dfsg-1)
- the JVM under jEdit was: Oracle JDK/JRE 1.8.0_65
comment:7 by , 9 years ago
I've tried the same test again, but running jEdit via OpenJDK 7 (package: openjdk-7-jre:amd64 7u95-2.6.4-0ubuntu0.14.04.1). The funny thing is that in the erroneous case (i.e. opening a 260K text file, copying it to the clipboard and pasting it on the host into jEdit) the guest didn't crash! :-) Instead I got some error on the stdout of the JVM process that was running jEdit:
8:38:18 AM [AWT-EventQueue-0] [error] Registers: java.io.IOException: Owner failed to convert data 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at sun.awt.X11.XSelection.validateDataGetter(XSelection.java:444) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at sun.awt.X11.XSelection.getData(XSelection.java:378) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at sun.awt.X11.XClipboard.getClipboardData(XClipboard.java:120) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at sun.awt.datatransfer.ClipboardTransferable.fetchOneFlavor(ClipboardTransferable.java:117) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at sun.awt.datatransfer.ClipboardTransferable.<init>(ClipboardTransferable.java:97) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at sun.awt.X11.XClipboard.getContents(XClipboard.java:106) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.Registers$ClipboardRegister.getTransferable(Registers.java:778) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.Registers.paste(Registers.java:245) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.lang.reflect.Method.invoke(Method.java:606) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.bsh.Reflect.invokeMethod(Reflect.java:134) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.bsh.Reflect.invokeStaticMethod(Reflect.java:98) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.bsh.Name.invokeMethod(Name.java:871) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.bsh.BSHBlock.evalBlock(BSHBlock.java:130) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.bsh.BSHBlock.eval(BSHBlock.java:80) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.bsh.BshMethod.invokeImpl(BshMethod.java:362) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.bsh.BshMethod.invoke(BshMethod.java:258) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.bsh.BshMethod.invoke(BshMethod.java:186) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.BeanShellFacade.runCachedBlock(BeanShellFacade.java:225) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanShell.java:431) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShellAction.java:73) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:342) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.jEdit$4.invokeAction(jEdit.java:3423) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.jEdit$4.invokeAction(jEdit.java:3405) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at org.gjt.sp.jedit.EditAction$Wrapper.actionPerformed(EditAction.java:212) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at javax.swing.AbstractButton.doClick(AbstractButton.java:376) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.Component.processMouseEvent(Component.java:6516) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at javax.swing.JComponent.processMouseEvent(JComponent.java:3312) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.Component.processEvent(Component.java:6281) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.Container.processEvent(Container.java:2229) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.Component.dispatchEventImpl(Component.java:4872) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.Container.dispatchEventImpl(Container.java:2287) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.Component.dispatchEvent(Component.java:4698) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.Container.dispatchEventImpl(Container.java:2273) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.Window.dispatchEventImpl(Window.java:2719) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.Component.dispatchEvent(Component.java:4698) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.EventQueue.access$300(EventQueue.java:103) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.EventQueue$3.run(EventQueue.java:706) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.EventQueue$3.run(EventQueue.java:704) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.security.AccessController.doPrivileged(Native Method) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.EventQueue$4.run(EventQueue.java:720) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.EventQueue$4.run(EventQueue.java:718) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.security.AccessController.doPrivileged(Native Method) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.EventQueue.dispatchEvent(EventQueue.java:717) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) 8:38:18 AM [AWT-EventQueue-0] [error] Registers: at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Looks like it's not a complete stacktrace though. :(
But still: it's progress. :)
comment:8 by , 9 years ago
If I start jEdit via Oracle's JVM from the console, I do not get any error logged, when the guest OS crashes during the paste from clipboard. There's a difference though:
- with OpenJDK 7 I get the error from the JVM. the pasted text doesn't appear in jEdit and the guest survives
- with Oracle's JVM 8 I do not get any errors, the pasted does (!) appear in jEdit and the guest crashes
comment:9 by , 9 years ago
Using Oracle JRE 1.6.0_31 with jEdit causes the same crash of the Windows guest.
It appears I cannot modify the original description and the default formatting joined the log lines into a sinlge line.
So the VB log ended like this:
And the syslog/kern.log lines were these: