Bug#656063: usb_modeswitch_dispatcher: free(): invalid next size
Le 22/01/2012 12:25, Josua Dietze a écrit : Am 15.01.2012 17:48, schrieb Frederic MASSOT: I have several crash of usb_modeswitch_dispatcher ... ... Jan 15 17:12:23 lobon usb_modeswitch_dispatcher: *** glibc detected *** /usr/sbin/usb_modeswitch_ dispatcher: free(): invalid next size (normal): 0x099c3340 *** After several tests I have pinpointed a problem with seems to revolve around setting the PATH environment variable from within the dispatcher script. Any subsequent exec command resulted in a crash. This happens only with the binary dispatcher and *only* in the udev-triggered context. Running the binary dispatcher manually from the command line will succeed as expected. I have attached a patch for an immediate work-around. Further research is neccessary though. Hi, Thank you for your patch, I have not had time to test it. With EnableLogging = 1 I had another crash which was recorded, I hope this helps. *** glibc detected *** /usr/sbin/usb_modeswitch_dispatcher: free(): invalid next size (normal): 0x080959f8 *** === Backtrace: = /lib/i386-linux-gnu/i686/cmov/libc.so.6(+0x6aac1)[0xb7616ac1] /lib/i386-linux-gnu/i686/cmov/libc.so.6(+0x6c328)[0xb7618328] /lib/i386-linux-gnu/i686/cmov/libc.so.6(+0x6feea)[0xb761beea] /lib/i386-linux-gnu/i686/cmov/libc.so.6(realloc+0xdd)[0xb761c4ad] /usr/lib/i386-linux-gnu/libjim.so.0debian2(Jim_Realloc+0x23)[0xb7711233] === Memory map: 08048000-0804f000 r-xp 08:01 14938 /usr/sbin/usb_modeswitch_dispatcher 0804f000-0805 rw-p 6000 08:01 14938 /usr/sbin/usb_modeswitch_dispatcher 08059000-080bc000 rw-p 00:00 0 [heap] b740-b7421000 rw-p 00:00 0 b7421000-b750 ---p 00:00 0 b757a000-b7596000 r-xp 08:01 129945 /lib/i386-linux-gnu/libgcc_s.so.1 b7596000-b7597000 rw-p 0001b000 08:01 129945 /lib/i386-linux-gnu/libgcc_s.so.1 b75a6000-b75a7000 rw-p 00:00 0 b75a7000-b75a9000 r-xp 08:01 135147 /lib/i386-linux-gnu/i686/cmov/libdl-2.13.so b75a9000-b75aa000 r--p 1000 08:01 135147 /lib/i386-linux-gnu/i686/cmov/libdl-2.13.so b75aa000-b75ab000 rw-p 2000 08:01 135147 /lib/i386-linux-gnu/i686/cmov/libdl-2.13.so b75ab000-b75ac000 rw-p 00:00 0 b75ac000-b76ff000 r-xp 08:01 135159 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so b76ff000-b770 ---p 00153000 08:01 135159 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so b770-b7702000 r--p 00153000 08:01 135159 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so b7702000-b7703000 rw-p 00155000 08:01 135159 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so b7703000-b7706000 rw-p 00:00 0 b7706000-b774d000 r-xp 08:01 5952 /usr/lib/i386-linux-gnu/libjim.so.0debian2.0.73 b774d000-b774f000 r--p 00046000 08:01 5952 /usr/lib/i386-linux-gnu/libjim.so.0debian2.0.73 b774f000-b775 rw-p 00048000 08:01 5952 /usr/lib/i386-linux-gnu/libjim.so.0debian2.0.73 b775c000-b7761000 rw-p 00:00 0 b7761000-b7762000 r-xp 00:00 0 [vdso] b7762000-b777d000 r-xp 08:01 135127 /lib/i386-linux-gnu/ld-2.13.so b777d000-b777e000 r--p 0001b000 08:01 135127 /lib/i386-linux-gnu/ld-2.13.so b777e000-b777f000 rw-p 0001c000 08:01 135127 /lib/i386-linux-gnu/ld-2.13.so bfbc2000-bfbe3000 rw-p 00:00 0 [stack] USB_ModeSwitch log from Thu Jan 26 18:58:47 CET 2012 Raw args from udev: /1-3:1.0 Using global config file: /etc/usb_modeswitch.conf Using top device dir /sys/bus/usb/devices/1-3 USB values from sysfs: manufacturer Vodafone (ZTE) product Vodafone Mobile Broadband K3765-Z serialP673A1VDF_MS bNumConfigurations is 1 - don't check for active configuration Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz Regards. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#656063: usb_modeswitch_dispatcher: free(): invalid next size
Am 15.01.2012 17:48, schrieb Frederic MASSOT: I have several crash of usb_modeswitch_dispatcher ... ... Jan 15 17:12:23 lobon usb_modeswitch_dispatcher: *** glibc detected *** /usr/sbin/usb_modeswitch_ dispatcher: free(): invalid next size (normal): 0x099c3340 *** After several tests I have pinpointed a problem with seems to revolve around setting the PATH environment variable from within the dispatcher script. Any subsequent exec command resulted in a crash. This happens only with the binary dispatcher and *only* in the udev-triggered context. Running the binary dispatcher manually from the command line will succeed as expected. I have attached a patch for an immediate work-around. Further research is neccessary though. Josua Dietze diff -urN usb-modeswitch-1.2.2/usb_modeswitch.tcl usb-modeswitch-1.2.2-1/usb_modeswitch.tcl --- usb-modeswitch-1.2.2/usb_modeswitch.tcl 2012-01-19 01:02:58.0 +0100 +++ usb-modeswitch-1.2.2-1/usb_modeswitch.tcl 2012-01-22 11:43:21.0 +0100 @@ -27,7 +27,7 @@ set flags(logging) 0 set flags(noswitching) 0 -set env(PATH) /bin:/sbin:/usr/bin:/usr/sbin +#set env(PATH) /bin:/sbin:/usr/bin:/usr/sbin # Execution starts at file bottom @@ -230,7 +230,7 @@ # Now we are actually switching if $flags(logging) { Log Command to be run:\nusb_modeswitch -I -W -D -s 20 $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f \$configBuffer - set report [exec usb_modeswitch -I -W -D -s 20 $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f $configBuffer 2@ stdout] + set report [exec /usr/sbin/usb_modeswitch -I -W -D -s 20 $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f $configBuffer 2@ stdout] Log \nVerbose debug output of usb_modeswitch and libusb follows Log (Note that some USB errors are to be expected in the process) Log @@ -238,7 +238,7 @@ Log Log (end of usb_modeswitch output)\n } else { - set report [exec usb_modeswitch -I -Q -D -s 20 $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f $configBuffer 2@ stdout] + set report [exec /usr/sbin/usb_modeswitch -I -Q -D -s 20 $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f $configBuffer 2@ stdout] } break } else {
Bug#656063: usb_modeswitch_dispatcher: free(): invalid next size
Package: usb-modeswitch Version: 1.2.1+repack0-1+b1 Severity: normal Hi I have several crash of usb_modeswitch_dispatcher when I connect my USB 3G. In the log I have this message: Jan 15 17:12:21 lobon kernel: [ 226.084094] usb 1-3: new high speed USB device number 6 using eh ci_hcd Jan 15 17:12:22 lobon kernel: [ 226.633229] usb 1-3: New USB device found, idVendor=19d2, idProd uct=2000 Jan 15 17:12:22 lobon kernel: [ 226.633245] usb 1-3: New USB device strings: Mfr=3, Product=2, S erialNumber=4 Jan 15 17:12:22 lobon kernel: [ 226.633256] usb 1-3: Product: Vodafone Mobile Broadband K3765-Z Jan 15 17:12:22 lobon kernel: [ 226.633264] usb 1-3: Manufacturer: Vodafone (ZTE) Jan 15 17:12:22 lobon kernel: [ 226.633271] usb 1-3: SerialNumber: P673A1VDF_MS Jan 15 17:12:22 lobon mtp-probe: checking bus 1, device 6: /sys/devices/pci:00/:00:1d.7/ usb1/1-3 Jan 15 17:12:22 lobon kernel: [ 226.640855] scsi5 : usb-storage 1-3:1.0 Jan 15 17:12:23 lobon mtp-probe: bus: 1, device: 6 was not an MTP device Jan 15 17:12:23 lobon usb_modeswitch_dispatcher: *** glibc detected *** /usr/sbin/usb_modeswitch_ dispatcher: free(): invalid next size (normal): 0x099c3340 *** Jan 15 17:12:23 lobon kernel: [ 227.643427] scsi 5:0:0:0: CD-ROM Vodafone USB SCSI C D-ROM USB PQ: 0 ANSI: 2 Jan 15 17:12:23 lobon kernel: [ 227.664063] sr0: scsi-1 drive Jan 15 17:12:23 lobon kernel: [ 227.664881] sr 5:0:0:0: Attached scsi CD-ROM sr0 The problem happens from time to time with the EnableLogging = 0. When EnableLogging = 1 I do not have this problem. Regards. -- System Information: Debian Release: wheezy/sid APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'testing'), (500, 'stable') Architecture: i386 (i686) Kernel: Linux 3.1.0-1-686-pae (SMP w/1 CPU core) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages usb-modeswitch depends on: ii dpkg 1.16.1.1 ii libc62.13-21 ii libjim0debian2 0.73-1 ii libusb-0.1-4 2:0.1.12-19 ii usb-modeswitch-data 20111023-1 usb-modeswitch recommends no packages. Versions of packages usb-modeswitch suggests: pn comgt none pn wvdial none -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org