Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#29120 - [calc] segfault on fresh system

Attached to Project: Community Packages
Opened by Jon (crondog) - Monday, 26 March 2012, 11:58 GMT
Last edited by Sergej Pupykin (sergej) - Friday, 18 May 2012, 07:02 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: I just installed calc from community but it is segfaulting. This is on a fresh install of arch x64 from a couple of days ago. I was running calc no problems before then. I have also compiled a version from abs so i could use run gdb. Please let me know if you require anymore information. Thanks


Additional info:
* package version(s) : calc 2.12.4.4-1 x64
* config and/or log files etc.

dmesg
[17396.026968] calc[20951] general protection ip:7f95fe6ebd3e sp:7fff9808f9c8 error:0 in ld-2.15.so[7f95fe6d8000+21000]

---

gdb
Reading symbols from /usr/bin/calc...done.
(gdb) run
Starting program: /usr/bin/calc

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7defd3e in _dl_runtime_resolve () from /lib/ld-linux-x86-64.so.2
(gdb) backtrace
#0 0x00007ffff7defd3e in _dl_runtime_resolve () from /lib/ld-linux-x86-64.so.2
#1 0x0000000000401c54 in main (argc=<optimized out>, argv=0x7fffffffea38) at calc.c:508

---

ll /lib/ld-*
-rwxr-xr-x 1 root root 158K Mar 1 16:29 /lib/ld-2.15.so*
lrwxrwxrwx 1 root root 10 Mar 1 16:29 /lib/ld-linux-x86-64.so.2 -> ld-2.15.so*
lrwxrwxrwx 1 root root 26 Mar 2 04:06 /lib/ld-linux.so.2 -> ../usr/lib32/ld-linux.so.2*

Steps to reproduce: pacman -S calc...
This task depends upon

Closed by  Sergej Pupykin (sergej)
Friday, 18 May 2012, 07:02 GMT
Reason for closing:  Fixed
Comment by Alexander F. Rødseth (xyproto) - Tuesday, 27 March 2012, 06:26 GMT
Hi, I'm unable to reproduce, but here are some things we can check:

- What's the md5sum of /usr/bin/calc? Here it's: 474e1597b9f97bf5b2ca60eafc2cc581 (I'm also on x86_64)

- Do you happen to have one of the following files on your system? If yes, what happens if you remove them, temporarily?
./bindings
./cal/bindings
~/.cal/bindings
/usr/share/calc/startup
~/.calcrc
./.calcinit

- Is your disk and memory okay?

- Please attach the log file after running the following command:
echo exit | strace -o log calc

Also, if you have the opportunity, please try to get hold of the "even better gdb output" as described in:
https://wiki.archlinux.org/index.php/Step_By_Step_Debugging_Guide

Thanks for reporting.
Comment by Jon (crondog) - Tuesday, 27 March 2012, 09:06 GMT
md5sum /usr/bin/calc
474e1597b9f97bf5b2ca60eafc2cc581 /usr/bin/calc

I don't have any of those files.

Im assuming my disk and memory is ok. What would you suggested to test (if it is really necessary)

Attached is the log

This is the output from bt full (there is no core file)

Reading symbols from /usr/bin/calc...done.
(gdb) run
Starting program: /usr/bin/calc

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7defd3e in _dl_runtime_resolve () from /lib/ld-linux-x86-64.so.2
(gdb) bt full
#0 0x00007ffff7defd3e in _dl_runtime_resolve () from /lib/ld-linux-x86-64.so.2
No symbol table info available.
#1 0x000000000040284b in main (argc=<optimized out>, argv=0x7fffffffea38) at calc.c:508
want_defhelp = 0
cmdlen = <optimized out>
newcmdlen = <optimized out>
c = <optimized out>
index = 1
maxindex = 1
cp = 0x0
endcp = 0x0
bp = <optimized out>
done = <optimized out>
havearg = <optimized out>
haveendstr = <optimized out>
len = <optimized out>

From the gdb output it says that it failed in calc.c:508. That line is

508 stdin_tty = isatty(0); /* assume stdin is on fd 0*/

I just tried to run it from tty2 and it works with no problems. My current setup is compiz standalone with urxvt-256 / urxvt. I think this might have something to do with it... Compiz is running in tty7

Would you like any other information?
   log (4.7 KiB)
Comment by Alexander F. Rødseth (xyproto) - Tuesday, 27 March 2012, 09:29 GMT
Good detective work. This is an upstream bug. To get it fixed, it should be reported to the calc developers (calc-bugs):
http://www.isthe.com/chongo/tech/comp/calc/email.html#bugs
Comment by Jon (crondog) - Tuesday, 27 March 2012, 09:53 GMT
No problems. Email has been sent.
Comment by Sergej Pupykin (sergej) - Thursday, 17 May 2012, 10:10 GMT
can not reproduce on current system
Comment by Jon (crondog) - Thursday, 17 May 2012, 23:17 GMT
Completely forgot about this. Calc is working for me now (just tried it). There must have been an update from something else that fixed the issue that i was having (i havent really changed anything since reporting this)...

Loading...