BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001226 [BusyBox] Networking Support block always 02-16-07 07:47 03-02-07 15:09
Reporter goutnet View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version 1.4.x
Summary 0001226: static busybox break tftp
Description tftp can not download any file when compiled as static (with glibc), I have not tried with uClibc :

client:

:/$ /bin/tftp -g -l /tmp/version.txt -r /rootfs/version.txt 10.0.0.1
using server "10.0.0.1:69", remotefile "/rootfs/version.txt", localfile "/tmp/version.txt".
sending 28 bytes
00 01 2f 72 6f 6f 74 66 73 2f 76 65 72 73 69 6f 6e 2e 74 78 74 00 6f 63 74 65 74 00
tftp: timeout
sending 28 bytes
00 01 2f 72 6f 6f 74 66 73 2f 76 65 72 73 69 6f 6e 2e 74 78 74 00 6f 63 74 65 74 00
tftp: timeout
sending 28 bytes
00 01 2f 72 6f 6f 74 66 73 2f 76 65 72 73 69 6f 6e 2e 74 78 74 00 6f 63 74 65 74 00
tftp: timeout
sending 28 bytes
00 01 2f 72 6f 6f 74 66 73 2f 76 65 72 73 69 6f 6e 2e 74 78 74 00 6f 63 74 65 74 00
tftp: timeout
sending 28 bytes
00 01 2f 72 6f 6f 74 66 73 2f 76 65 72 73 69 6f 6e 2e 74 78 74 00 6f 63 74 65 74 00
tftp: timeout
tftp: last timeout


server log :

Feb 16 16:45:58 eikichi atftpd[14858]: Serving /rootfs/version.txt to 192.168.100.71:32925
Feb 16 16:45:58 eikichi atftpd[14858]: timeout: retrying...
Feb 16 16:46:23 eikichi last message repeated 8 times
Feb 16 16:46:28 eikichi atftpd[14858]: Serving /rootfs/version.txt to 192.168.100.71:32925
Feb 16 16:46:33 eikichi atftpd[14858]: timeout: retrying...
Feb 16 16:46:38 eikichi atftpd[14858]: timeout: retrying...
Feb 16 16:46:38 eikichi atftpd[14858]: Serving /rootfs/version.txt to 192.168.100.71:32925
Feb 16 16:46:43 eikichi atftpd[14858]: timeout: retrying...
Feb 16 16:47:03 eikichi last message repeated 7 times


looking to tcpdump, the answer is sent from the server, but the client does not listen ... I tried several other clients, all works ...
Additional Information I uploaded my .config
Attached Files  .config [^] (17,884 bytes) 02-16-07 07:47

- Relationships

- Notes
(0002177)
vda
02-17-07 08:10

I think your build produced the following warning:

#warning Static linking against glibc produces buggy executables
#warning (glibc does not cope well with ld --gc-sections).
#warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
#warning Note that glibc is unsuitable for static linking anyway.
#warning If you still want to do it, remove -Wl,--gc-sections
#warning from top-level Makefile and remove this warning.

Did you try non-static build? Did you remove -Wl,--gc-sections?

Please show those tcpdumps you mention.

Also there were some fixes to tftp recently, consider testing current svn.
 
(0002181)
goutnet
02-19-07 07:46

I did remove the mentionned code, applying a selfmade patch :

Index: busybox/Makefile
===================================================================
--- busybox.orig/Makefile 2007-02-15 16:42:26.000000000 +0100
+++ busybox/Makefile 2007-02-15 16:42:29.000000000 +0100
@@ -563,7 +563,7 @@
 quiet_cmd_busybox__ ?= LINK $@ />        cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \
       -o $@ \
- -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
+ -Wl,--warn-common -Wl,--sort-common \
       -Wl,--start-group $(busybox-all) -Wl,--end-group
 
 # Generate System.map
Index: busybox/applets/applets.c
===================================================================
--- busybox.orig/applets/applets.c 2007-02-15 16:43:00.000000000 +0100
+++ busybox/applets/applets.c 2007-02-15 16:43:07.000000000 +0100
@@ -15,16 +15,6 @@
 #include "busybox.h"
 #include <assert.h>
 
-/* Apparently uclibc defines __GLIBC__ (compat trick?). Oh well. */
-#if ENABLE_STATIC && defined(__GLIBC__) && !defined(__UCLIBC__)
-#warning Static linking against glibc produces buggy executables
-#warning (glibc does not cope well with ld --gc-sections).
-#warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
-#warning Note that glibc is unsuitable for static linking anyway.
-#warning If you still want to do it, remove -Wl,--gc-sections
-#warning from top-level Makefile and remove this warning.
-#endif
-
 #if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE
 static const char usage_messages[] =
 #define MAKE_USAGE

a non static build work (as mentionned), only static build fails, I'll redo the tcpdump thing when I can (and I will try the svn version as well)
 
(0002182)
goutnet
02-19-07 08:13

I just checked the svn version, and this fix the issue ... I didn't look carefully to the code, but it sounds like there were only minor changes ...

Well, anyway, thanks for the trick :)
 

- Issue History
Date Modified Username Field Change
02-16-07 07:47 goutnet New Issue
02-16-07 07:47 goutnet Status new => assigned
02-16-07 07:47 goutnet Assigned To  => BusyBox
02-16-07 07:47 goutnet File Added: .config
02-17-07 08:10 vda Note Added: 0002177
02-19-07 07:46 goutnet Note Added: 0002181
02-19-07 08:13 goutnet Note Added: 0002182
03-02-07 15:09 vda Status assigned => closed
03-02-07 15:09 vda Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker