Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 139179

Summary: net-misc/dhcpcd-2.0.7 + ppc gcc-4.1.1 with -O3 has breakages.
Product: Gentoo Linux Reporter: hiyuh <hiyuh.root>
Component: [OLD] UnspecifiedAssignee: PPC Porters <ppc>
Status: VERIFIED TEST-REQUEST    
Severity: normal CC: uberlord
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: my emerge --info
Fix warnig for implicitly strcmp usage.
Fix warnig for a singedness.
A modified ebuild for net-misc/dhcpcd-2.0.7
a log of official net-misc/dhcpcd-2.0.7 with gcc-4.1.1 + -O3
A log of modified net-misc/dhcpcd-2.0.7 with gcc-4.1.1 + replaced -O3 to -O2
2.0.5 - 2.0.6 arp only patch
2.0.5 - 2.0.6 signals only patch
2.0.5 - 2.0.6 signals only patch
a log of "dhcpcd -v LOG_DEBUG" (2.0.8 with -O3)
a log of "dhcpcd -v LOG_DEBUG" (2.0.8 with -O2, instead of -O3)
2.0.5 - 2.0.6 signals only patch

Description hiyuh 2006-07-04 06:23:35 UTC
I'm not sure which stuff has really casus, though.
I've poked dhcpcd-2.0.7 with final patch on bug #137800.
So, I did realized, gcc-4.1.1 with -O3 may break dhcpcd.
At least 2.0.6 and 2.0.7 has breakages for my PowerBook which is so critical
that wouldn't get any IP address in my office LAN env.
2.0.5 didn't have critial breakages with gcc-4.1.1 and -O3,
I mean it can get IP address, but wierd runtime warnings are.
At the moment, I figured out "use ppc && replace-flags -O3 -O2" could help
my issue.

Well, the G4's typical newbie rice flags are known like,
CFLAGS="-O3 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec" and whatever.
I've tested some stuffs with it + "-Wall" for squashing annoied implicitly
compilation/optimization bugs.

And then, its annoied warnings would be squashed by my own patches.
Comment 1 hiyuh 2006-07-04 06:24:59 UTC
Created attachment 90849 [details]
my emerge --info
Comment 2 hiyuh 2006-07-04 06:26:42 UTC
Created attachment 90850 [details, diff]
Fix warnig for implicitly strcmp usage.
Comment 3 hiyuh 2006-07-04 06:27:34 UTC
Created attachment 90851 [details, diff]
Fix warnig for a singedness.
Comment 4 hiyuh 2006-07-04 06:31:54 UTC
Created attachment 90852 [details]
A modified ebuild for net-misc/dhcpcd-2.0.7

With bug #137800 and some waring squshed, if it on ppc, replace -O3 to -O2.
It just works for me, otherwise I have to mask >=net-misc/dhcpcd-2.0.6 and
stick 2.0.5.
Comment 5 hiyuh 2006-07-04 06:41:28 UTC
Created attachment 90853 [details]
a log of official net-misc/dhcpcd-2.0.7 with gcc-4.1.1 + -O3
Comment 6 hiyuh 2006-07-04 06:42:42 UTC
Created attachment 90854 [details]
A log of modified net-misc/dhcpcd-2.0.7 with gcc-4.1.1 + replaced -O3 to -O2
Comment 7 Roy Marples (RETIRED) gentoo-dev 2006-07-04 08:12:30 UTC
Created attachment 90858 [details, diff]
2.0.5 - 2.0.6 arp only patch

Please test this patch against a vanilla 2.0.5 and see if works or not
Comment 8 Roy Marples (RETIRED) gentoo-dev 2006-07-04 08:13:31 UTC
Created attachment 90859 [details, diff]
2.0.5 - 2.0.6 signals only patch

Please test if this works against a vanilla 2.0.5 or not
Comment 9 Roy Marples (RETIRED) gentoo-dev 2006-07-04 08:18:22 UTC
OK, the only difference between 2.0.5 (which apparently works on PPC -O3) and 2.0.6 (which apparently doesn't work on PPC -O3) where patches to signal handing and doing ARP by default.

Now, I guess that for 2.0.6 and higher he's using the -a switch (new in 2.0.6) to disable automatic ARP checking as I don't see any check messages in his logs.

So the error is probably in our signal handling (which has changed again in 2.0.7 but that also apparently does not work), so the error is probably somewhere in that patch.

Please note that this error does not happen on x86 with -O3 and I'll test amd64 when I can, so this bug is really upto the PPC team. And I'd prefer a patch to the dhcpcd code instead of just flag filtering ;)
Comment 10 hiyuh 2006-07-05 06:17:31 UTC
Thanks for quick response, Roy. :)

I'd like to try to distinct casus with your splited patches.
I had already prepared modified net-misc/dhcpcd-2.0.5 with your patches.
But, here, my office, is already 10:00 PM.
So, I'll test/report the result tomorrow.
Sorry for inconvenient as a tester/reporter is. :(
Comment 11 Roy Marples (RETIRED) gentoo-dev 2006-07-10 04:28:03 UTC
amd64 works fine with -O3 - any update on this yet?
Comment 12 hiyuh 2006-07-10 09:03:17 UTC
Well, sorry for too delaying.
Because of I was getting a bit of screwing up during the tests for some cases.

I've tested your splited patches with vanilla net-misc/dhcpcd-2.0.5.
Of cource, without my own stupid patches.
Here's a result on my PowerBook.
* net-misc/dhcpcd-2.0.5 
  * 2.0.5 - 2.0.6 arp only patch 
    * CFLAGS includes -O3
      It works for my office LAN env.
      It can get a IP address 192.9.200.240/24.
    * CFLAGS includes -O2
      It works for my office LAN env.
      It can get a IP address 192.9.200.240/24.
  * 2.0.5 - 2.0.6 signals only patch
    * CFLAGS includes -O3
      It didn't works for my office LAN env.
      It couldn't get any IP address, and it got time out.
    * CFLAGS includes -O2
      It works for my office LAN env.
      It can get a IP address 192.9.200.240/24.
  * 2.0.5 - 2.0.6 arp and signals patch
    * CFLAGS includes -O3
      It didn't works for my office LAN env.
      It couldn't get any IP address, and it got time out.
    * CFLAGS includes -O2
      It works for my office LAN env.
      It can get a IP address 192.9.200.204/24.

The last test case's IP address is not typo.
It got 192.9.200.204/24 on my PowerBook,
which got 192.9.240/24 in other test cases.
And, any dhcpcd binary of these all test cases couldn't exec with "-v
LOG_DEBUG" or so on for getting debug logs.
It got only SIGSEGVs, I couldn't get and show you its debug logs.

And then, I've already poked dhcpcd-2.0.5 with my own patches.
My patches make only compilation warnigs to be silence, IMHO.
But, it could help to solve this issue.
That's why I was getting screwing up...

* net-misc/dhcpcd-2.0.5
  * CFLAGS include -O3
    * with fix warning for a signedness, only
      It didn't works for my office LAN env.
    * with fix warning for implicitly strcmp, only
      It didn't works for my office LAN env.
    * with both fixes
      It works for my office LAN env.
      It can get a IP address 192.9.200.240/24.
    * with out both fixes
      It didn't works for my office LAN env.
      This case uses completely vanilla net-misc/dhcpcd-2.0.5.

I forgot to mention first my post means my own tweak net-misc/dhcpcd-2.0.5
which includes both my fixes with -O3 works.
Vanilla net-misc/dhcpcd (at least, 2.0.5 and 2.0.7} in official tree ) with -O3
couldn't get any IP address in my office LAN env.
On the other hands, 2.0.5 or 2.0.7 with -O2 is all OK for me.
Comment 13 Roy Marples (RETIRED) gentoo-dev 2006-07-10 09:35:45 UTC
(In reply to comment #12)
> * net-misc/dhcpcd-2.0.5
>   * CFLAGS include -O3
>     * with both fixes
>       It works for my office LAN env.
>       It can get a IP address 192.9.200.240/24.

...

> 
> I forgot to mention first my post means my own tweak net-misc/dhcpcd-2.0.5
> which includes both my fixes with -O3 works.

So you're saying that regardless of my patches or dhcpcd version used, -O3 works with dhcpcd-2.0.5, 2.0.6 and 2.0.7 when using your two patches?
Comment 14 Roy Marples (RETIRED) gentoo-dev 2006-07-11 16:30:13 UTC
Created attachment 91522 [details, diff]
2.0.5 - 2.0.6 signals only patch

Changed jmp_bug to sigjmp_buf

Please re-test without filtering -O3
Comment 15 Roy Marples (RETIRED) gentoo-dev 2006-07-12 07:08:09 UTC
Please test dhcpcd-2.0.8
Comment 16 hiyuh 2006-07-14 04:43:17 UTC
(In reply to comment #14)
> Created an attachment (id=91522) [edit]
> 2.0.5 - 2.0.6 signals only patch
> 
> Changed jmp_bug to sigjmp_buf
> 
> Please re-test without filtering -O3
OK, I'll try it, thanks.

(In reply to comment #15)
> Please test dhcpcd-2.0.8
Well, it didn't work without filtering -O3.
But, it works fine with "replace-flags -O3 -O2"...
I'd attach the both log of "dhcpcd -v LOG_DEBUG".
Comment 17 hiyuh 2006-07-14 04:45:26 UTC
Created attachment 91702 [details]
a log of "dhcpcd -v LOG_DEBUG" (2.0.8 with -O3)
Comment 18 hiyuh 2006-07-14 04:46:39 UTC
Created attachment 91703 [details]
a log of "dhcpcd -v LOG_DEBUG" (2.0.8 with -O2, instead of -O3)
Comment 19 Roy Marples (RETIRED) gentoo-dev 2006-07-22 10:08:46 UTC
Created attachment 92504 [details, diff]
2.0.5 - 2.0.6 signals only patch

This new patch makes the way we can setsigjmp the same as elsewhere - please test with -O3.

If that fails I really am out of ideas :/
Comment 20 Roy Marples (RETIRED) gentoo-dev 2006-11-27 13:30:38 UTC
dhcpcd-3.0.0 should fix this :)
Comment 21 hiyuh 2006-11-27 18:50:45 UTC
(In reply to comment #20)
> dhcpcd-3.0.0 should fix this :)

Thanks, nice complete re-write, I've confirmed IT JUST WORKS(tm) :)

FYI, here's output of emerge --info on the confirmed environment.

Portage 2.1.2_rc2-r2 (default-linux/ppc/ppc32/2006.1/G4, gcc-4.1.1,
glibc-2.5-r0, 2.6.18-gentoo-r3 ppc)
=================================================================
System uname: 2.6.18-gentoo-r3 ppc 7447A, altivec supported
Gentoo Base System version 1.12.6
Last Sync: Mon, 27 Nov 2006 23:50:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2,
1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="ppc ~ppc"
AUTOCLEAN="yes"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O3 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -Wall -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo
/etc/texmf/web2c"
CXXFLAGS="-O3 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -Wall -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache collision-protect distlocks metadata-transfer
sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.gentoo.gr.jp http://gentoo.gg3.net/
ftp://gg3.net/pub/linux/gentoo ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO
http://gentoo.channelx.biz"
LINGUAS="ja"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times
--compress --force --whole-file --delete --delete-after --stats
--timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.jp.gentoo.org/gentoo-portage"
USE="ppc X a52 aac aalib alsa altivec amr aoss apm asf async audiofile
bash-completion bdf berkdb bitmap-fonts bl bluetooth bzip2 cairo canvas
cdparanoia cdr cjk cle266 cli cracklib crypt cscope ctype dga dlloader
dri dts dvd dvdread dvix4linux ecc edl elibc_glibc emboss encode expat
fat fbcon fbdev ffmpeg fftw firefox flac flash fltk fontconfig fortran
fpx ftp gd gdbm ggi gif glitz glx gmp gnutls gpm graphviz gs gtk gtk2
gtkhtml hfs ibam iconv idn ieee1394 imagemagick imlib input_devices_evdev
input_devices_keyboard input_devices_mouse input_devices_synaptics ipv6
isdnlog jfs jpeg jpeg2k kernel_linux lame lcms libcaca libg++ libwww
linguas_ja lzo mad matroska mikmod mng modplug mozdevelop mozilla moznoirc
moznomail mozsvg mozxmlterm mp3 mp4 mpeg ncurses network nfs nls nptl
nptlonly nsplugin ntfs ogg opengl openssh openssl pam pango pbbuttonsd pci
pcre pdf plotutils png ppcsha1 pppd python quicktime readline reflection
reiserfs rle sdl session sftplogging speex spl ssl svg sysfs tcpd tga
theora threads tiff timidity truetype truetype-fonts type1-fonts udev
unicode usb userland_GNU vcd video_cards_fbdev video_cards_nouveau
video_cards_nv vim vim-pager vim-syntax vim-with-x vorbis wifi x264
xanim xfs xine xinerama xml xml2 xorg xpm xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
PORTAGE_RSYNC_EXTRA_OPTS
Comment 22 Roy Marples (RETIRED) gentoo-dev 2006-11-28 02:01:51 UTC
You may want to chime in on Bug #156446 to get the PPC keywords re-added then :)