Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usb_flasher Core dumps and crashes when trying to flash #30

Open
fake-name opened this issue Feb 28, 2017 · 4 comments
Open

usb_flasher Core dumps and crashes when trying to flash #30

fake-name opened this issue Feb 28, 2017 · 4 comments

Comments

@fake-name
Copy link

1 vagrant@vagrant:~/BBBlfs/bin⟫ sudo ./usb_flasher
*** Error in `./usb_flasher': double free or corruption (fasttop): 0x00000000006a6da0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f7e06ea07e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x7fe0a)[0x7f7e06ea8e0a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f7e06eac98c]
./usb_flasher[0x401705]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f7e06e49830]
./usb_flasher[0x4021e9]
======= Memory map: ========
00400000-00404000 r-xp 00000000 fc:00 1572124                            /home/vagrant/BBBlfs/bin/usb_flasher
00603000-00604000 r--p 00003000 fc:00 1572124                            /home/vagrant/BBBlfs/bin/usb_flasher
00604000-00605000 rw-p 00004000 fc:00 1572124                            /home/vagrant/BBBlfs/bin/usb_flasher
0068b000-006ca000 rw-p 00000000 00:00 0                                  [heap]
7f7e00000000-7f7e00021000 rw-p 00000000 00:00 0
7f7e00021000-7f7e04000000 ---p 00000000 00:00 0
7f7e05fed000-7f7e06003000 r-xp 00000000 fc:00 785431                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7f7e06003000-7f7e06202000 ---p 00016000 fc:00 785431                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7f7e06202000-7f7e06203000 rw-p 00015000 fc:00 785431                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7f7e06203000-7f7e06204000 ---p 00000000 00:00 0
7f7e06204000-7f7e06a04000 rw-p 00000000 00:00 0
7f7e06a04000-7f7e06a0b000 r-xp 00000000 fc:00 785612                     /lib/x86_64-linux-gnu/librt-2.23.so
7f7e06a0b000-7f7e06c0a000 ---p 00007000 fc:00 785612                     /lib/x86_64-linux-gnu/librt-2.23.so
7f7e06c0a000-7f7e06c0b000 r--p 00006000 fc:00 785612                     /lib/x86_64-linux-gnu/librt-2.23.so
7f7e06c0b000-7f7e06c0c000 rw-p 00007000 fc:00 785612                     /lib/x86_64-linux-gnu/librt-2.23.so
7f7e06c0c000-7f7e06c24000 r-xp 00000000 fc:00 785625                     /lib/x86_64-linux-gnu/libpthread-2.23.so
7f7e06c24000-7f7e06e23000 ---p 00018000 fc:00 785625                     /lib/x86_64-linux-gnu/libpthread-2.23.so
7f7e06e23000-7f7e06e24000 r--p 00017000 fc:00 785625                     /lib/x86_64-linux-gnu/libpthread-2.23.so
7f7e06e24000-7f7e06e25000 rw-p 00018000 fc:00 785625                     /lib/x86_64-linux-gnu/libpthread-2.23.so
7f7e06e25000-7f7e06e29000 rw-p 00000000 00:00 0
7f7e06e29000-7f7e06fe8000 r-xp 00000000 fc:00 785619                     /lib/x86_64-linux-gnu/libc-2.23.so
7f7e06fe8000-7f7e071e8000 ---p 001bf000 fc:00 785619                     /lib/x86_64-linux-gnu/libc-2.23.so
7f7e071e8000-7f7e071ec000 r--p 001bf000 fc:00 785619                     /lib/x86_64-linux-gnu/libc-2.23.so
7f7e071ec000-7f7e071ee000 rw-p 001c3000 fc:00 785619                     /lib/x86_64-linux-gnu/libc-2.23.so
7f7e071ee000-7f7e071f2000 rw-p 00000000 00:00 0
7f7e071f2000-7f7e07209000 r-xp 00000000 fc:00 791914                     /lib/x86_64-linux-gnu/libusb-1.0.so.0.1.0
7f7e07209000-7f7e07408000 ---p 00017000 fc:00 791914                     /lib/x86_64-linux-gnu/libusb-1.0.so.0.1.0
7f7e07408000-7f7e07409000 r--p 00016000 fc:00 791914                     /lib/x86_64-linux-gnu/libusb-1.0.so.0.1.0
7f7e07409000-7f7e0740a000 rw-p 00017000 fc:00 791914                     /lib/x86_64-linux-gnu/libusb-1.0.so.0.1.0
7f7e0740a000-7f7e07430000 r-xp 00000000 fc:00 785605                     /lib/x86_64-linux-gnu/ld-2.23.so
7f7e075f8000-7f7e075fb000 rw-p 00000000 00:00 0
7f7e075fb000-7f7e07619000 r-xp 00000000 fc:00 784910                     /lib/x86_64-linux-gnu/libudev.so.1.6.4
7f7e07619000-7f7e0761a000 r--p 0001d000 fc:00 784910                     /lib/x86_64-linux-gnu/libudev.so.1.6.4
7f7e0761a000-7f7e0761b000 rw-p 0001e000 fc:00 784910                     /lib/x86_64-linux-gnu/libudev.so.1.6.4
7f7e0761b000-7f7e0761c000 rw-p 00000000 00:00 0
7f7e0762c000-7f7e0762f000 rw-p 00000000 00:00 0
7f7e0762f000-7f7e07630000 r--p 00025000 fc:00 785605                     /lib/x86_64-linux-gnu/ld-2.23.so
7f7e07630000-7f7e07631000 rw-p 00026000 fc:00 785605                     /lib/x86_64-linux-gnu/ld-2.23.so
7f7e07631000-7f7e07632000 rw-p 00000000 00:00 0
7ffdc653d000-7ffdc655e000 rw-p 00000000 00:00 0                          [stack]
7ffdc65d5000-7ffdc65d7000 r--p 00000000 00:00 0                          [vvar]
7ffdc65d7000-7ffdc65d9000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

I'm working in a vagrant virtualbox, trying to flash my beaglebone. The device is passed through using virtualbox usb filtering.

@fake-name
Copy link
Author

fake-name commented Feb 28, 2017

Backtrace in gdb:


Thread 1 "usb_flasher" received signal SIGABRT, Aborted.
0x00007ffff782b428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff782b428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff782d02a in __GI_abort () at abort.c:89
#2  0x00007ffff786d7ea in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7ffff79862e0 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff7875e0a in malloc_printerr (ar_ptr=<optimized out>, ptr=<optimized out>, str=0x7ffff79863a8 "double free or corruption (fasttop)", action=3) at malloc.c:5004
#4  _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3865
#5  0x00007ffff787998c in __GI___libc_free (mem=<optimized out>) at malloc.c:2966
#6  0x0000000000401705 in main (argc=<optimized out>, argv=<optimized out>) at main.c:217

I'm not sure how to compile the usb_flasher application for debugging.

@fake-name
Copy link
Author

So I commented out line 217 in main.c, and it made it further (It's currently apparently sitting doing something(?) after printing "SPL has started!" It appears to be using 100% CPU too.

Sure, it now leaks the device list, but I don't really care as long as it works?

@ravikp7
Copy link

ravikp7 commented Aug 4, 2017

Hi @fake-name , I've made a node.js bootloader server for BeagleBone here . Well, almost a port of BBBlfs but with some changes. It can boot BB into USB mass storage utilising uboot's ums feature. Please try it, and provide feedback. I'm working on a complete GUI flashing tool also.

@KarmaMan1982
Copy link

root@TE-ENT21:/home/markus/BBBlfs/bin# ./usb_flasher
double free or corruption (fasttop)
Abgebrochen (Speicherabzug geschrieben)
root@TE-ENT21:/home/markus/BBBlfs/bin# ./usb_flasher
libusb: error [udev_hotplug_event] ignoring udev action bind
NetworkManager is not able to connect it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants