On Sun, Jan 03, 2010 at 11:09:09PM +0100, Martin Costabel wrote:
> Daniel Macks wrote:
> []
> >> This looks like dpkg is not able to handle files with a file name longer 
> >> than 256 characters. On the other hand, I don't understand why this bug 
> >> only shows up on 10.6/32bit and not on 10.6/64bit nor on 10.5/32bit.
> > 
> > Also doesn't seem to choke on 10.4/ppc. Wonder if there is some static
> > buffer used to hold a pathname? I have:
> > 
> > /usr/include/limits.h:#define   _POSIX_PATH_MAX         256
> > /usr/include/sys/param.h:#define        MAXPATHLEN      PATH_MAX
> > /usr/include/sys/syslimits.h:#define    PATH_MAX                 1024   /* 
> > max bytes in pathname */
> > 
> > The "paste" subprocess is in dpkg-deb/extract.c:extracthalf(), where I
> > can't decipher the forking and stream processing that is used to read
> > the .deb. Try a simpler dpkg-deb modes to make sure this is where it's
> > choking: "dpkg-deb -c foo.deb" vs "dpkg-deb -X foo.deb /tmp". I think
> > the actual archive reading is done with a system(tar) call, so that
> > command (and its platform variations, and different fink-installed
> > versions) could be another place to look for the root cause:
> > 
> >   dpkg-deb --fsys-tarfile foo.deb > archive.tar
> > 
> > to extract the .deb filesystem archive and then try 'tar -xf
> > archive.tar' with various different tar commands.
> 
> All these command-line things work correctly for me. No crash and no 
> missing files.
> 
> Two more data points: When running "fink install sbcl" or dpkg -k, after 
> the failure the file with the long name is actually installed. It is the 
> last one that is installed. The next one would be 
> Methods-common-to-all-streams.html, but it is not there. If one rune 
> install again, then the long file exists twice, once with a .dpkg-tmp 
> extension and once without. This should narrow down the point where the 
> crash happens.
> 
> There is also a crash report:
> 
> > Exception Type:  EXC_CRASH (SIGABRT)
> > Exception Codes: 0x0000000000000000, 0x0000000000000000
> > Crashed Thread:  0  Dispatch queue: com.apple.main-thread
> > 
> > Application Specific Information:
> > __abort() called
> > 
> > Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
> > 0   libSystem.B.dylib                   0x90064732 __kill + 10
> > 1   libSystem.B.dylib                   0x90064724 kill$UNIX2003 + 32
> > 2   libSystem.B.dylib                   0x900f798d raise + 26
> > 3   libSystem.B.dylib                   0x9010d9d9 __abort + 124
> > 4   libSystem.B.dylib                   0x900f071c 
> > release_file_streams_for_task + 0
> > 5   dpkg                                0x00008a6a tarobject + 6277
> > 6   dpkg                                0x00020a71 TarExtractor + 759
> > 7   dpkg                                0x0000bc4c process_archive + 7772
> > 8   dpkg                                0x0000997a archivefiles + 1849
> > 9   dpkg                                0x00003748 main + 323


main/archives.c:tarobject() uses a static buffer to store a filename
during installation. Wanna guess the size of fnamebuf[]? Try bumping
it to something "much larger". Latest dpkg upstream still has this
same hardcoded size.

dan

-- 
Daniel Macks
dma...@netspace.org
http://www.netspace.org/~dmacks


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to