Summary: | www-client/elinks-0.11.0 compiles on HPPA with USE=ruby but fails at runtime | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jeroen Roovers (RETIRED) <jer> |
Component: | Current packages | Assignee: | Michal Januszewski (RETIRED) <spock> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | hppa |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | HPPA | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
elinks-0.11.0-ruby.patch
strace output without and with ~/.elinks/hooks.rb ~/.elinks/hooks.rb |
Description
Jeroen Roovers (RETIRED)
2006-02-01 20:05:18 UTC
Sorry for the bug spam. From dmesg: [96305.780000] do_page_fault() pid=28732 command='elinks' type=15 address=0x00000130 [96305.780000] [96305.780000] YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI [96305.780000] PSW: 00000000000001001111111100001011 Not tainted [96305.780000] r00-03 00000000 407b6778 406f20c3 407c77fc [96305.780000] r04-07 407b4778 407c9e5c 407b4778 407b9f78 [96305.780000] r08-11 00162a88 0011b800 00000006 407b4778 [96305.780000] r12-15 407b4778 dadababa 0017f288 407c77fc [96305.780000] r16-19 407b4778 407b4778 00125800 407b4778 [96305.780000] r20-23 0026b5d8 00000000 407b6778 00000001 [96305.780000] r24-27 00000001 00000006 417da390 00145288 [96305.780000] r28-31 00000001 fb0f9648 fb0f9000 407bb738 [96305.780000] sr0-3 0000010f 00000000 00000000 0000010f [96305.780000] sr4-7 0000010f 0000010f 0000010f 0000010f [96305.780000] [96305.780000] VZOUICununcqcqcqcqcqcrmunTDVZOUI [96305.780000] FPSR: 00001000001000000000000000000000 [96305.790000] FPER1: 00000000 [96305.790000] fr00-03 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [96305.790000] fr04-07 0001e6200000f310 41b51f43614ccccd 415e848000000000 41b4a531614ccccd [96305.790000] fr08-11 428933a6c7464000 40c3880000000000 41cde2d44e000000 40aafc0000000000 [96305.790000] fr12-15 0000000000000000 0000000010175430 0000000000000000 0000000000000000 [96305.790000] fr16-19 fffffff410453810 106a409cffffffff 43ebebeb103306c7 0000000000000000 [96305.790000] fr20-23 45e69c6a25b7ea20 4180000010165ad8 0000000000000002 000000010002d930 [96305.790000] fr24-27 0000000200000000 4024000000000000 3fe0000000000000 bfb8298cc1440290 [96305.790000] fr28-31 3fd9f59ccfaeff5c 4118c1c000000000 412e848000000000 4008000000000000 [96305.790000] [96305.790000] IASQ: 0000010f 0000010f IAOQ: 406f20eb 406f20ef [96305.790000] IIR: 4aa60260 ISR: 0000010f IOR: 00000130 [96305.790000] CPU: 0 CR30: 12ad8000 CR31: 103f8000 [96305.790000] ORIG_R28: 00000000 [96305.790000] IAOQ[0]: 0x406f20eb [96305.790000] IAOQ[1]: 0x406f20ef [96305.790000] RP(r2): 0x406f20c3 I think this will be better handled by the HPPA team -- reassigning. Created attachment 78825 [details, diff]
elinks-0.11.0-ruby.patch
Between 0.10.6 and 0.11.0, the authors of elinks apparently decided to not bother with string lengths anymore and let ruby do it, by (almost, but not quite entirely) switching from rb_str_new to rb_str_new2. This patch removes the only use of rb_str_new left in all of elinks 0.11.0.
Also note that neither the bug nor the patch are HPPA specific.
Thanks for the patch :) I thought the problem was HPPA-specific because I wasn't able to reproduce it on my x86 machine. I was also a little confused by the kernel oops, thinking that problems in userspace apps shouldn't normally cause oopses. > Between 0.10.6 and 0.11.0, the authors of elinks apparently decided to not > bother with string lengths anymore and let ruby do it, by (almost, but not > quite entirely) switching from rb_str_new to rb_str_new2. What are you talking about? ELinks used rb_str_new2 from the beginning. > This patch removes > the only use of rb_str_new left in all of elinks 0.11.0. Why? This actually reverts a bugfix and has no apparent justification. > Also note that neither the bug nor the patch are HPPA specific. Please explain how you know this. Here are some relevant events. 1. Initially, ELinks uses rb_str_new2 with a NUL-terminated string. 2. The string changes to one that isn't NUL-terminated. 3. Oops! We fix the code to use rb_str_new. 4. This bug report comes along. An ELinks developer who apparently wasn't familiar with the history of the Ruby code applies your patch, which reverts back to rb_str_new2. 5. Today, somebody reports corruption on #elinks. We track it down to using rb_str_new2 instead of rb_str_new. Why did you post that patch? Were you just shooting in the dark? I plan to revert it. Can you still reproduce the crash? Could I have the versions of Ruby and ELinks involved as well as a full backtrace? I really would appreciate that. Is it okay to re-open this report? (In reply to comment #6) > What are you talking about? ELinks used rb_str_new2 from the beginning. Thanks for the update. A lot has changed for Gentoo/HPPA lately so I'll try and verify whether elinks builds without the patch soonish. Created attachment 89795 [details] strace output without and with ~/.elinks/hooks.rb The command used was # strace -o elinks.out elinks http:/www.orkz.net/ Without hooks.rb, elinks merely crashes a few seconds after displaying the page and after receiving keyboard input. With hooks.rb, it never responds to keyboard input and can only be killed while its CPU usage skyrockets. Created attachment 89797 [details] ~/.elinks/hooks.rb The hooks.rb was taken verbatim from [1]. Note that it is valid ruby but shouldn't do anything for the URL I loaded. jeroen@elmer ~ $ ruby -c .elinks/hooks.rb Syntax OK The version of ruby used here is: Fri Jun 16 05:39:53 2006 >>> dev-lang/ruby-1.8.4-r3 [1] http://edulinux.homeunix.org/elinks/ Do we have a solution for this? If it crashes both with the patch and without it, and no one has any idea of how to fix the problem, perhaps we should mask the 'ruby' USE flag for elinks on hppa? (In reply to comment #10) > Do we have a solution for this? If it crashes both with the patch and without > it, and no one has any idea of how to fix the problem, perhaps we should mask > the 'ruby' USE flag for elinks on hppa? Ehrm, it always crashes without the patch. It never crashes *with* the patch. Hence the patch. 8-) You can make the patch conditional on `use hppa` if you like. I have no idea what elinks' developers think of this bug now or what Gentoo's relations to them are like, but for HPPA this bug is fixed. I regret that things happened the way they did and I certainly hope that next time, any patches will be sent upstream for review first. |