Re: Bug#685625: libgeom: may cause segfault of grub-probe
If it's a question of minimal impact to fix the specific crash that grub-probe encounters, then there are two more minimal ways to fix this specific problem that come to mind: replace reallocf with realloc---but in the unlikely case that realloc fails, it doesn't deallocate the argument (this is the point of reallocf) explicitly declare reallocf instead of using the bsd/ header: void *reallocf(void *, size_t) however, I don't think either of these is better than the approach I originally proposed, to add a #include directive that matches the one in the reallocf manpage that debian ships. (dropping the -Werror= flag addition would of course make it a bit more minimal; it might avoid an FTBFS in the future, but if it's an FTBFS that would point right at another crashing bug, well, it might be a bonus rather than a detriment to FTBFS) Being unfamiliar with the culture and practices of Debian, I can't speak to whether a more invasive ('overlay') approach is appropriate or not in light of the present freeze, but it seems that Guillem Jover has concerns about doing that at this moment. The machine where I originally encountered the trouble isn't yet in production, so if there's an alternate fix proposed soon I'll be happy to test it out. On the other hand, I think the presence or absence of the implicit declaration warning is enough to indicate whether the bug is present under any given fix... Jeff -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20121229154328.ga13...@unpythonic.net
Re: libgeom: may cause segfault of grub-probe
On Fri, 2012-12-28 at 19:44:41 -0800, Christoph Egger wrote: I see there's a patch in this bug report. Do you think this is a solution for wheezy? If so I'd volunteer to upload a new version of freebsd-libs I've checked now the interaction of the libbsd-overlay and freebsd-glue, and they do not play well. Consequently that would require way more changes than the proposed patch, so even if I've not tested it, it would seem to be the better solution for now given the freeze. Moving the -Werror line one up would reduce the diff by 1, but that's pretty much insignificant, so regardless of that: Acked-by: Guillem Jover guil...@debian.org I'll add missing stuff to libbsd, and for jessie I'll make freebsd-glue play well with the overlay, once that's fixed the other packages can be switched back to use the overlay. Thanks, Guillem -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20121229154910.ga25...@gaara.hadrons.org
Re: libgeom: may cause segfault of grub-probe
Hi, I agree that libbsd and freebsd-glue seem to conflict with each other, but neither one of them by itself has everything needed for freebsd-libs. So Jeff's patch is the least intrusive way to fix this, and that's what we have to go with at this late stage. It fixes a bug we're seeing now and is unlikely to introduce more... I can provide a similar patch for freebsd-utils which has the same issues, but the only problem I could confirm yet was a segfault in ifconfig bridge configuration (#696514) due to it. I propose adding the -Werror part of the patch into Wheezy as well. If it does trigger a FTBFS, it's because we missed something, or something wrong with the build environment that we need to know about. We might need to drop it someday for a new upstream release but hopefully not. Regards, -- Steven Chamberlain ste...@pyro.eu.org -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/50df1e95.3080...@pyro.eu.org
Re: libgeom: may cause segfault of grub-probe
On 29/12/12 16:47, Steven Chamberlain wrote: I can provide a similar patch for freebsd-utils which has the same issues, but the only problem I could confirm yet was a segfault in ifconfig bridge configuration (#696514) due to it. Attached is a similar patch for freebsd-utils, fixing implicit declarations that are due to libbsd no longer being used. Should we apply it? The warnings are potentially serious, but I don't know of any specific bugs that this will fix. (#696514 turned out not to be due to these). Regards, -- Steven Chamberlain ste...@pyro.eu.org Index: freebsd-utils-9.0+ds1/usr.sbin/mountd/mountd.c === --- freebsd-utils-9.0+ds1.orig/usr.sbin/mountd/mountd.c 2012-12-29 19:56:58.0 + +++ freebsd-utils-9.0+ds1/usr.sbin/mountd/mountd.c 2012-12-29 20:05:01.478673213 + @@ -80,6 +80,8 @@ #include stdlib.h #include string.h #include unistd.h +#include bsd/stdio.h + #include pathnames.h #include mntopts.h Index: freebsd-utils-9.0+ds1/usr.sbin/vidcontrol/vidcontrol.c === --- freebsd-utils-9.0+ds1.orig/usr.sbin/vidcontrol/vidcontrol.c 2010-03-29 21:12:44.0 +0100 +++ freebsd-utils-9.0+ds1/usr.sbin/vidcontrol/vidcontrol.c 2012-12-29 20:05:04.610607859 + @@ -48,6 +48,8 @@ #include sys/errno.h #include sys/types.h #include sys/stat.h +#include bsd/err.h + #include path.h #include decode.h Index: freebsd-utils-9.0+ds1/usr.sbin/ppp/defs.c === --- freebsd-utils-9.0+ds1.orig/usr.sbin/ppp/defs.c 2004-09-05 02:46:52.0 +0100 +++ freebsd-utils-9.0+ds1/usr.sbin/ppp/defs.c 2012-12-29 20:00:01.091748618 + @@ -47,6 +47,7 @@ #include time.h #endif #include unistd.h +#include bsd/unistd.h #if defined(__FreeBSD__) !defined(NOKLDLOAD) #include id.h Index: freebsd-utils-9.0+ds1/usr.sbin/nfsd/nfsd.c === --- freebsd-utils-9.0+ds1.orig/usr.sbin/nfsd/nfsd.c 2012-12-29 19:56:58.0 + +++ freebsd-utils-9.0+ds1/usr.sbin/nfsd/nfsd.c 2012-12-29 20:00:04.194641584 + @@ -71,6 +71,7 @@ #include stdlib.h #include string.h #include unistd.h +#include bsd/unistd.h /* Global defs */ #ifdef DEBUG Index: freebsd-utils-9.0+ds1/usr.sbin/arp/arp.c === --- freebsd-utils-9.0+ds1.orig/usr.sbin/arp/arp.c 2012-12-29 19:56:58.0 + +++ freebsd-utils-9.0+ds1/usr.sbin/arp/arp.c 2012-12-29 20:00:07.442606898 + @@ -80,6 +80,7 @@ #include string.h #include strings.h #include unistd.h +#include bsd/stdlib.h typedef void (action_fn)(struct sockaddr_dl *sdl, struct sockaddr_inarp *s_in, struct rt_msghdr *rtm); Index: freebsd-utils-9.0+ds1/usr.sbin/rpc.lockd/kern.c === --- freebsd-utils-9.0+ds1.orig/usr.sbin/rpc.lockd/kern.c 2012-12-29 19:56:58.0 + +++ freebsd-utils-9.0+ds1/usr.sbin/rpc.lockd/kern.c 2012-12-29 20:00:14.848822213 + @@ -52,6 +52,7 @@ #include unistd.h #include netdb.h #include signal.h +#include bsd/unistd.h #include nlm_prot.h #include nfs/nfsproto.h Index: freebsd-utils-9.0+ds1/usr.sbin/pppctl/pppctl.c === --- freebsd-utils-9.0+ds1.orig/usr.sbin/pppctl/pppctl.c 2004-12-13 14:50:13.0 + +++ freebsd-utils-9.0+ds1/usr.sbin/pppctl/pppctl.c 2012-12-29 20:00:17.754640690 + @@ -48,6 +48,7 @@ #include string.h #include time.h #include unistd.h +#include bsd/unistd.h #define LINELEN 2048 Index: freebsd-utils-9.0+ds1/usr.bin/kdump/kdump.c === --- freebsd-utils-9.0+ds1.orig/usr.bin/kdump/kdump.c 2012-12-29 19:56:58.0 + +++ freebsd-utils-9.0+ds1/usr.bin/kdump/kdump.c 2012-12-29 20:05:19.540626059 + @@ -83,6 +83,8 @@ #include time.h #include unistd.h #include vis.h +#include bsd/string.h + #include ktrace.h #include kdump_subr.h Index: freebsd-utils-9.0+ds1/sbin/geom/core/geom.c === --- freebsd-utils-9.0+ds1.orig/sbin/geom/core/geom.c 2011-03-24 19:11:05.0 + +++ freebsd-utils-9.0+ds1/sbin/geom/core/geom.c 2012-12-29 20:06:16.428605677 + @@ -46,6 +46,8 @@ #include inttypes.h #include dlfcn.h #include assert.h +#include bsd/err.h + #include libgeom.h #include geom.h Index: freebsd-utils-9.0+ds1/sbin/geom/class/eli/geom_eli.c === --- freebsd-utils-9.0+ds1.orig/sbin/geom/class/eli/geom_eli.c 2010-11-22 20:10:48.0 + +++ freebsd-utils-9.0+ds1/sbin/geom/class/eli/geom_eli.c 2012-12-29 20:00:30.210625738 + @@ -43,6 +43,7 @@ #include paths.h #include errno.h #include assert.h +#include bsd/stdlib.h #include
Re: libgeom: may cause segfault of grub-probe
Hi all! I'd like to hear -release@'s opinion on that. Do you prefer the smaller patch only fixing the implicit declarations/includes where we know it has caused this segfaults or can I upload the full change below? Regards Christoph Steven Chamberlain ste...@pyro.eu.org writes: This is a multi-part message in MIME format. --030202080401090604090105 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 29/12/12 16:47, Steven Chamberlain wrote: I can provide a similar patch for freebsd-utils which has the same issues, but the only problem I could confirm yet was a segfault in ifconfig bridge configuration (#696514) due to it. Attached is a similar patch for freebsd-utils, fixing implicit declarations that are due to libbsd no longer being used. Should we apply it? The warnings are potentially serious, but I don't know of any specific bugs that this will fix. (#696514 turned out not to be due to these). Regards, -- Steven Chamberlain ste...@pyro.eu.org --030202080401090604090105 Content-Type: text/x-patch; name=implicit-declaration.patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=implicit-declaration.patch Index: freebsd-utils-9.0+ds1/usr.sbin/mountd/mountd.c === --- freebsd-utils-9.0+ds1.orig/usr.sbin/mountd/mountd.c 2012-12-29 19:56:58.0 + +++ freebsd-utils-9.0+ds1/usr.sbin/mountd/mountd.c2012-12-29 20:05:01.478673213 + @@ -80,6 +80,8 @@ #include stdlib.h #include string.h #include unistd.h +#include bsd/stdio.h + #include pathnames.h #include mntopts.h Index: freebsd-utils-9.0+ds1/usr.sbin/vidcontrol/vidcontrol.c === --- freebsd-utils-9.0+ds1.orig/usr.sbin/vidcontrol/vidcontrol.c 2010-03-29 21:12:44.0 +0100 +++ freebsd-utils-9.0+ds1/usr.sbin/vidcontrol/vidcontrol.c2012-12-29 20:05:04.610607859 + @@ -48,6 +48,8 @@ #include sys/errno.h #include sys/types.h #include sys/stat.h +#include bsd/err.h + #include path.h #include decode.h Index: freebsd-utils-9.0+ds1/usr.sbin/ppp/defs.c === --- freebsd-utils-9.0+ds1.orig/usr.sbin/ppp/defs.c2004-09-05 02:46:52.0 +0100 +++ freebsd-utils-9.0+ds1/usr.sbin/ppp/defs.c 2012-12-29 20:00:01.091748618 + @@ -47,6 +47,7 @@ #include time.h #endif #include unistd.h +#include bsd/unistd.h #if defined(__FreeBSD__) !defined(NOKLDLOAD) #include id.h Index: freebsd-utils-9.0+ds1/usr.sbin/nfsd/nfsd.c === --- freebsd-utils-9.0+ds1.orig/usr.sbin/nfsd/nfsd.c 2012-12-29 19:56:58.0 + +++ freebsd-utils-9.0+ds1/usr.sbin/nfsd/nfsd.c2012-12-29 20:00:04.194641584 + @@ -71,6 +71,7 @@ #include stdlib.h #include string.h #include unistd.h +#include bsd/unistd.h /* Global defs */ #ifdef DEBUG Index: freebsd-utils-9.0+ds1/usr.sbin/arp/arp.c === --- freebsd-utils-9.0+ds1.orig/usr.sbin/arp/arp.c 2012-12-29 19:56:58.0 + +++ freebsd-utils-9.0+ds1/usr.sbin/arp/arp.c 2012-12-29 20:00:07.442606898 + @@ -80,6 +80,7 @@ #include string.h #include strings.h #include unistd.h +#include bsd/stdlib.h typedef void (action_fn)(struct sockaddr_dl *sdl, struct sockaddr_inarp *s_in, struct rt_msghdr *rtm); Index: freebsd-utils-9.0+ds1/usr.sbin/rpc.lockd/kern.c === --- freebsd-utils-9.0+ds1.orig/usr.sbin/rpc.lockd/kern.c 2012-12-29 19:56:58.0 + +++ freebsd-utils-9.0+ds1/usr.sbin/rpc.lockd/kern.c 2012-12-29 20:00:14.848822213 + @@ -52,6 +52,7 @@ #include unistd.h #include netdb.h #include signal.h +#include bsd/unistd.h #include nlm_prot.h #include nfs/nfsproto.h Index: freebsd-utils-9.0+ds1/usr.sbin/pppctl/pppctl.c === --- freebsd-utils-9.0+ds1.orig/usr.sbin/pppctl/pppctl.c 2004-12-13 14:50:13.0 + +++ freebsd-utils-9.0+ds1/usr.sbin/pppctl/pppctl.c2012-12-29 20:00:17.754640690 + @@ -48,6 +48,7 @@ #include string.h #include time.h #include unistd.h +#include bsd/unistd.h #define LINELEN 2048 Index: freebsd-utils-9.0+ds1/usr.bin/kdump/kdump.c === --- freebsd-utils-9.0+ds1.orig/usr.bin/kdump/kdump.c 2012-12-29 19:56:58.0 + +++ freebsd-utils-9.0+ds1/usr.bin/kdump/kdump.c 2012-12-29 20:05:19.540626059 + @@ -83,6 +83,8 @@ #include time.h #include unistd.h #include vis.h +#include bsd/string.h + #include ktrace.h #include kdump_subr.h
Re: libgeom: may cause segfault of grub-probe
Christoph Egger christ...@debian.org writes: I'd like to hear -release@'s opinion on that. Do you prefer the smaller patch only fixing the implicit declarations/includes where we know it has caused this segfaults or can I upload the full change below? Oh sorry I should read more carefull. That's of course a diff for a different package (-utils vs -libs). I'm still inclined to also upload -utils with that diff. Steven, SVN has fixes for #694374 and #695679 already. do you intent these for wheezy? If so let's add #696514 and potentially the implicit declarations and get it uploaded as well. Regards Christoph -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87licgo1iy@mitoraj.siccegge.de
Re: libgeom: may cause segfault of grub-probe
On 29/12/12 23:56, Christoph Egger wrote: Steven, SVN has fixes for #694374 and #695679 already. do you intent these for wheezy? Yes, please. They are not RC severity but sufficiently important for release, and in particular #695679 should be fixed for people doing squeeze-wheezy upgrades of jail systems. If so let's add #696514 and potentially the implicit declarations and get it uploaded as well. I think it is beneficial, yes. And as minimal as it can be. There are some remaining implicit declarations, but are more complex, therefore I'm leaving those as they are and I haven't enabled the -Werror flag for this package yet. Thanks! Regards, -- Steven Chamberlain ste...@pyro.eu.org -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/50df8559.1090...@pyro.eu.org
Bug#685625: marked as done ([kfreebsd] libgeom: may cause segfault of grub-probe)
Your message dated Sun, 30 Dec 2012 00:02:58 + with message-id e1tp6mk-0004ua...@franck.debian.org and subject line Bug#685625: fixed in freebsd-libs 9.0+ds1-4 has caused the Debian Bug report #685625, regarding [kfreebsd] libgeom: may cause segfault of grub-probe to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact ow...@bugs.debian.org immediately.) -- 685625: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685625 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems ---BeginMessage--- Package: kfreebsd-image-9.0-2-amd64 Version: 9.0-5 Severity: important Dear Maintainer, When using apt-get upgrade to get the latest version of kfreebsd-image-9.0-2-amd64, the package segfaults in the configure stage. , | # dpkg --configure kfreebsd-image-9.0-2-amd64 | Setting up kfreebsd-image-9.0-2-amd64 (9.0-5) ... | run-parts: executing /etc/kernel/postinst.d/apt-dater-host_reboot 9.0-2-amd64 /boot/kfreebsd-9.0-2-amd64.gz | run-parts: executing /etc/kernel/postinst.d/zz-update-grub 9.0-2-amd64 /boot/kfreebsd-9.0-2-amd64.gz | Segmentation fault | Segmentation fault | Generating grub.cfg ... | Found kernel of FreeBSD: /boot/kfreebsd-9.0-2-amd64.gz | Found kernel module directory: /lib/modules/9.0-2-amd64 | Segmentation fault | Segmentation fault | Segmentation fault | ls: cannot access /lib/modules/9.0-2-amd64/unknown.ko: No such file or directory | run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2 | dpkg: error processing kfreebsd-image-9.0-2-amd64 (--configure): | subprocess installed post-installation script returned error exit status 1 | Errors were encountered while processing: | kfreebsd-image-9.0-2-amd64 ` Not sure if I dare reboot, but will assist with debugging if needed. Thanks -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing') Architecture: kfreebsd-amd64 (x86_64) Kernel: kFreeBSD 9.0-1-amd64 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages kfreebsd-image-9.0-2-amd64 depends on: ii devd 9.0+ds1-7 ii freebsd-utils 9.0+ds1-7 ii kbdcontrol 9.0+ds1-7 ii kldutils 9.0+ds1-7 kfreebsd-image-9.0-2-amd64 recommends no packages. kfreebsd-image-9.0-2-amd64 suggests no packages. -- no debconf information ---End Message--- ---BeginMessage--- Source: freebsd-libs Source-Version: 9.0+ds1-4 We believe that the bug you reported is fixed in the latest version of freebsd-libs, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 685...@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Christoph Egger christ...@debian.org (supplier of updated freebsd-libs package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmas...@debian.org) -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Format: 1.8 Date: Sat, 29 Dec 2012 15:49:19 -0800 Source: freebsd-libs Binary: libsbuf6 libsbuf6-udeb libsbuf-dev libcam6 libcam-dev libgeom1 libgeom-dev libgeom1-udeb libusbhid4debian libusbhid-common libusbhid-dev libusb2debian libusb2-dev libusb2debian-udeb libkvm0 libkvm-dev libdevstat7 libdevstat-dev libmemstat3 libmemstat-dev libnetgraph4 libnetgraph-dev libipx2 libipx-dev libipx2-udeb libkiconv4 libkiconv-dev libjail1 libjail-dev libalias7 libalias-dev Architecture: source kfreebsd-amd64 all Version: 9.0+ds1-4 Distribution: unstable Urgency: low Maintainer: GNU/kFreeBSD Maintainers debian-bsd@lists.debian.org Changed-By: Christoph Egger christ...@debian.org Description: libalias-dev - Development files for libalias libalias7 - FreeBSD packet aliasing library libcam-dev - Development files for libcam libcam6- FreeBSD CAM (Common Access Method) library libdevstat-dev - Development files for libdevstat libdevstat7 - FreeBSD devstat (kernel interface) library libgeom-dev - Development files for libgeom libgeom1 - FreeBSD GEOM library libgeom1-udeb - FreeBSD GEOM library (udeb) (udeb) libipx-dev - Development files for libipx libipx2- FreeBSD IPX address conversion support library libipx2-udeb - FreeBSD IPX address conversion support library (udeb) (udeb) libjail-dev - Development files for libjail libjail1 - FreeBSD jail library libkiconv-dev - Development files for libkiconv libkiconv4
Re: libgeom: may cause segfault of grub-probe
Hi! I see there's a patch in this bug report. Do you think this is a solution for wheezy? If so I'd volunteer to upload a new version of freebsd-libs Regards Christoph -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/874nj5cyja@mitoraj.siccegge.de
Processed: Bug#685625: [kfreebsd] libgeom: may cause segfault of grub-probe
Processing commands for cont...@bugs.debian.org: reassign 685625 libgeom1 Bug #685625 [src:freebsd-utils] [kfreebsd] libgeom: may cause segfault of grub-probe Bug reassigned from package 'src:freebsd-utils' to 'libgeom1'. No longer marked as found in versions freebsd-utils/9.0+ds1-7. Ignoring request to alter fixed versions of bug #685625 to the same values previously set found 685625 9.0+ds1-3 Bug #685625 [libgeom1] [kfreebsd] libgeom: may cause segfault of grub-probe Marked as found in versions freebsd-libs/9.0+ds1-3. End of message, stopping processing here. Please contact me if you need assistance. -- 685625: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685625 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/handler.s.c.13563031037441.transcr...@bugs.debian.org
Processed: Bug#685625: [kfreebsd] libgeom: may cause segfault of grub-probe
Processing commands for cont...@bugs.debian.org: # Regression was introduced by # http://anonscm.debian.org/viewvc/glibc-bsd?view=revisionrevision=4273 fixed 685625 9.0+ds1-2 Bug #685625 [libgeom1] [kfreebsd] libgeom: may cause segfault of grub-probe Marked as fixed in versions freebsd-libs/9.0+ds1-2. thanks Stopping processing here. Please contact me if you need assistance. -- 685625: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685625 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/handler.s.c.135630379012425.transcr...@bugs.debian.org