Both "openxc-control version" and "openxc-dump" result in segfault error

175 views
Skip to first unread message

Claire Bergman

unread,
Jul 31, 2014, 1:44:49 PM7/31/14
to ope...@googlegroups.com
Hi Guys,

I recently got my VI and was getting it all set up, but I can't seem to get the emulator working properly and thought you might be able to lend some help. I am running vagrant on a 64-bit Windows 7 platform, and both the VI USB driver for windows and libusb on the virtual machine are installed. However, whenever I ssh into vagrant and try to set up the emulator by running either "openxc-control version" or "openxc-dump", I get "Segmentation fault (core dumped)". This happens whether or not the VI is plugged in. Any idea what specifically could be causing this and how to fix it?

Thanks!
Claire

Christopher Peplin

unread,
Jul 31, 2014, 11:20:18 PM7/31/14
to openxc@googlegroups com
Hey Claire,

Is there any other output besides the "Segmentation fault"? I'm guessing something is going wrong inside the USB library we are using, but I can't imagine what - I haven't ever seen a segfault. Can you paste the last 100 lines or so of the output of the command "dmesg" after you get the error?

Chris  


--
You received this message because you are subscribed to the Google Groups "OpenXC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openxc+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/openxc.
To view this discussion on the web visit https://groups.google.com/d/msgid/openxc/fde18b47-1cbb-424b-a2da-1db291f416c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Claire Bergman

unread,
Aug 6, 2014, 10:27:47 AM8/6/14
to ope...@googlegroups.com
Hey Chris,

There is no other output besides the segfault. Here are the last few lines from running openxc-dump:

[    2.952956] random: init urandom read with 43 bits of entropy available
[    3.301206] EXT4-fs (sda1): re-mounted. Opts: (null)
[    3.478929] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    3.664933] systemd-udevd[309]: starting version 204
[    3.954204] vboxvideo: module verification failed: signature and/or  required
 key missing - tainting kernel
[    3.954221] vboxvideo: Unknown symbol drm_open (err 0)
[    3.954236] vboxvideo: Unknown symbol drm_poll (err 0)
[    3.954238] vboxvideo: Unknown symbol drm_pci_init (err 0)
[    3.954241] vboxvideo: Unknown symbol drm_ioctl (err 0)
[    3.954243] vboxvideo: Unknown symbol drm_vblank_init (err 0)
[    3.954244] vboxvideo: Unknown symbol drm_mmap (err 0)
[    3.954245] vboxvideo: Unknown symbol drm_pci_exit (err 0)
[    3.954247] vboxvideo: Unknown symbol drm_release (err 0)
[    4.014059] type=1400 audit(1406822228.073:2): apparmor="STATUS" operation="p
rofile_load" profile="unconfined" name="/sbin/dhclient" pid=350 comm="apparmor_p
arser"
[    4.014066] type=1400 audit(1406822228.073:3): apparmor="STATUS" operation="p
rofile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.a
ction" pid=350 comm="apparmor_parser"
[    4.014070] type=1400 audit(1406822228.073:4): apparmor="STATUS" operation="p
rofile_load" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-script
" pid=350 comm="apparmor_parser"
[    4.014429] type=1400 audit(1406822228.073:5): apparmor="STATUS" operation="p
rofile_replace" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-clien
t.action" pid=350 comm="apparmor_parser"
[    4.014434] type=1400 audit(1406822228.073:6): apparmor="STATUS" operation="p
rofile_replace" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-scr
ipt" pid=350 comm="apparmor_parser"
[    4.014617] type=1400 audit(1406822228.073:7): apparmor="STATUS" operation="p
rofile_replace" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-scr
ipt" pid=350 comm="apparmor_parser"
[    4.035009] parport_pc 00:03: reported by Plug and Play ACPI
[    4.073319] input: Unspecified device as /devices/pci0000:00/0000:00:04.0/inp
ut/input5
[    4.082157] vboxguest: major 0, IRQ 20, I/O port d020, MMIO at 00000000f04000
00 (size 0x400000)
[    4.082161] vboxguest: Successfully loaded version 4.3.10_Ubuntu (interface 0
x00010004)
[    4.172771] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: R
X
[    4.971807] ppdev: user-space parallel port driver
[    5.292152] random: nonblocking pool is initialized
[    6.178861] init: Failed to obtain startpar-bridge instance: Unknown paramete
r: INSTANCE
[    6.805763] init: udev-fallback-graphics main process (650) terminated with s
tatus 1
[    7.287816] FS-Cache: Loaded
[    7.322691] RPC: Registered named UNIX socket transport module.
[    7.322694] RPC: Registered udp transport module.
[    7.322695] RPC: Registered tcp transport module.
[    7.322696] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    7.362890] FS-Cache: Netfs 'nfs' registered for caching
[    7.423072] Installing knfsd (copyright (C) 1996 ok...@monad.swb.de).
[    7.506178] init: failsafe main process (721) killed by TERM signal
[    7.910200] type=1400 audit(1406822231.969:8): apparmor="STATUS" operation="p
rofile_replace" profile="unconfined" name="/sbin/dhclient" pid=888 comm="apparmo
r_parser"
[    7.910209] type=1400 audit(1406822231.969:9): apparmor="STATUS" operation="p
rofile_replace" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-clien
t.action" pid=888 comm="apparmor_parser"
[    7.910213] type=1400 audit(1406822231.969:10): apparmor="STATUS" operation="
profile_replace" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-sc
ript" pid=888 comm="apparmor_parser"
[    7.910567] type=1400 audit(1406822231.969:11): apparmor="STATUS" operation="
profile_replace" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-clie
nt.action" pid=888 comm="apparmor_parser"
[    7.910570] type=1400 audit(1406822231.969:12): apparmor="STATUS" operation="
profile_replace" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-sc
ript" pid=888 comm="apparmor_parser"
[    7.910761] type=1400 audit(1406822231.969:13): apparmor="STATUS" operation="
profile_replace" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-sc
ript" pid=888 comm="apparmor_parser"
[    7.930431] type=1400 audit(1406822231.993:14): apparmor="STATUS" operation="
profile_load" profile="unconfined" name="/usr/sbin/tcpdump" pid=891 comm="apparm
or_parser"
[    7.993770] vboxvideo: Unknown symbol drm_open (err 0)
[    7.993775] vboxvideo: Unknown symbol drm_poll (err 0)
[    7.993779] vboxvideo: Unknown symbol drm_pci_init (err 0)
[    7.993783] vboxvideo: Unknown symbol drm_ioctl (err 0)
[    7.993786] vboxvideo: Unknown symbol drm_vblank_init (err 0)
[    7.993788] vboxvideo: Unknown symbol drm_mmap (err 0)
[    7.993791] vboxvideo: Unknown symbol drm_pci_exit (err 0)
[    7.993794] vboxvideo: Unknown symbol drm_release (err 0)
[    8.524056] vboxsf: Successfully loaded version 4.3.10_Ubuntu (interface 0x00
010004)
[   11.609068] init: plymouth-upstart-bridge main process ended, respawning
[   13.755455] init: pollinate main process (812) terminated with status 1
[  580.993132] openxc-control[1467]: segfault at 208 ip 00007fce892e69d5 sp 0000
7fffd30a1bd0 error 4 in libusb-1.0.so.0.1.0[7fce892e1000+15000]
[  585.935515] openxc-control[1473]: segfault at 208 ip 00007f3c4194d9d5 sp 0000
7ffffe6f8320 error 4 in libusb-1.0.so.0.1.0[7f3c41948000+15000]
[  587.769128] openxc-control[1479]: segfault at 208 ip 00007f772257f9d5 sp 0000
7fff53a112d0 error 4 in libusb-1.0.so.0.1.0[7f772257a000+15000]
[ 2032.714566] openxc-control[2327]: segfault at 208 ip 00007f9fd584d9d5 sp 0000
7fff5e83fc40 error 4 in libusb-1.0.so.0.1.0[7f9fd5848000+15000]
[ 2105.246601] openxc-control[2345]: segfault at 208 ip 00007f44f71289d5 sp 0000
7ffff86f7500 error 4 in libusb-1.0.so.0.1.0[7f44f7123000+15000]
[ 4800.197237] openxc-control[3175]: segfault at 208 ip 00007f2f11cef9d5 sp 0000
7fff9c684840 error 4 in libusb-1.0.so.0.1.0[7f2f11cea000+15000]
[ 5367.064836] openxc-control[3193]: segfault at 208 ip 00007f22484f19d5 sp 0000
7ffffc477d00 error 4 in libusb-1.0.so.0.1.0[7f22484ec000+15000]
[ 5549.045415] openxc-dump[3317]: segfault at 208 ip 00007f267089b9d5 sp 00007ff
fde352850 error 4 in libusb-1.0.so.0.1.0[7f2670896000+15000]
[ 5555.164574] openxc-dump[3323]: segfault at 208 ip 00007f19c83179d5 sp 00007ff
f025b7500 error 4 in libusb-1.0.so.0.1.0[7f19c8312000+15000]
[ 5556.315966] openxc-dump[3329]: segfault at 208 ip 00007fdd547f49d5 sp 00007ff
ff612ab30 error 4 in libusb-1.0.so.0.1.0[7fdd547ef000+15000]
[ 5557.428959] openxc-dump[3335]: segfault at 208 ip 00007fecf8d619d5 sp 00007ff
f23e9b0d0 error 4 in libusb-1.0.so.0.1.0[7fecf8d5c000+15000]
[11639.994226] openxc-dump[3736]: segfault at 208 ip 00007f10e478f9d5 sp 00007ff
fc824f6d0 error 4 in libusb-1.0.so.0.1.0[7f10e478a000+15000]
vagrant@vagrant-ubuntu-trusty-64:/vagrant$

Claire Bergman

unread,
Aug 6, 2014, 10:32:00 AM8/6/14
to ope...@googlegroups.com
And here are the last few lines from openxc-control version:

[    1.240944] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, does
n't support DPO or FUA
[    1.242767]  sda: sda1
[    1.243466] sd 0:0:0:0: [sda] Attached SCSI disk
[    1.345045] tsc: Refined TSC clocksource calibration: 2391.959 MHz
[    2.348052] Switched to clocksource tsc
[    2.754692] EXT4-fs (sda1): INFO: recovery required on readonly filesystem
[    2.755516] EXT4-fs (sda1): write access will be enabled during recovery
[    2.804284] EXT4-fs (sda1): recovery complete
[    2.805389] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts:
(null)
[12078.470262] openxc-control[3806]: segfault at 208 ip 00007fb3822259d5 sp 0000
7fffa0af0a70 error 4 in libusb-1.0.so.0.1.0[7fb382220000+15000]
[12119.020266] openxc-control[3868]: segfault at 208 ip 00007fa9ca65d9d5 sp 0000
7fffcfaca750 error 4 in libusb-1.0.so.0.1.0[7fa9ca658000+15000]

vagrant@vagrant-ubuntu-trusty-64:/vagrant$

On Thursday, July 31, 2014 11:20:18 PM UTC-4, Chris wrote:

Christopher Peplin

unread,
Aug 6, 2014, 11:37:23 PM8/6/14
to openxc@googlegroups com
Oh! I was a little confused, but I get the same error now. I actually have not yet tested connected to the VI via USB from Vagrant, only compiling the firmware since that is the hardest part to get set up properly. There's a little bit of extra complexity with attaching USB devices to a virtual machine that I wanted to avoid for now. I suggest trying to connect directly from Windows, following the installation steps for the Python library here: http://python.openxcplatform.com/en/latest/installation.html

I'm curious as to how hard it would be to support directly from Vagrant, though, so I'll definitely continue to look into that. Let me know if you get it working from Windows!

Chris


Claire Bergman

unread,
Aug 7, 2014, 4:38:54 PM8/7/14
to ope...@googlegroups.com
Thanks, Chris! I guess I just assumed that everything ran on the VM instead of just the compiling. Everything works great now in Windows. Thanks again!

Best,
Claire

Paul Graff

unread,
Jun 24, 2015, 8:00:50 AM6/24/15
to ope...@googlegroups.com
I had this issue to. It's giving a segfault because the openxc tool is trying to access a USB port that doesn't exist. To solve it, I had to open up Oracle VM VirtualBox and modify the settings of the virtual machine that Vagrant is using.

Fix:
Make sure your OpenXC hardware is plugged in with the emulator build on it
Power off your VM by running the command: $vagrant halt (do this is the same way you do $vagrant up and $vagrant suspend)
Open Oracle VM VirtualBox
Right click your VM on the left side, select settings
Go to the tab for USB.
Check both the boxes for "Enables USB Controller" and "Enable USB 2.0 (EHCI) Controller"
Click on the Add USB Filter button on the right side of the screen. (Picture of USB with a plus sign)
Select the OpenXC VI, it should pop up as an option when the button is pushed.
Click ok to exit the settings and restart your VM, you also may need to unplug and replug your USB.

After doing this, I could see the VI as a USB device in the VM, and could run openxc-dump. I had a permissions issue too, so you might need to run all the commands as sudo to get them to work.
Reply all
Reply to author
Forward
0 new messages