Ledger crashes with segmentation fault message. Dump from console: Proceed with upgrading packages [y/N]: y ledger-2.6.3_1.txz 100% 600KB 599.5KB/s 599.5KB/s 00:01 Checking integrity... done [1/1] Reinstalling ledger-2.6.3_1... done This port has installed sample data files, python samples and script samples for ledger in ${PREFIX}/share/examples/ledger/ Have fun! $ ledger [1] 9368 segmentation fault ledger How-To-Repeat: Run the command, no arguments are needed.
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Maintainer of finance/ledger, Please note that PR ports/186518 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/186518 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
hi Edwin, Would it be possible for me to get a login on a 10.Current box so I can look at the stack trace from the core file or something? i don't actually have a 10Current box up and running right now. Sincerely, Woody Carey
stack from binary package is not very interesting result of make WITH_DEBUG=yes and gdb on my system: gdb /usr/local/bin/ledger GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... gdb$ r [New LWP 101771] [New Thread 802406400 (LWP 101771/ledger)] Program received signal SIGILL, Illegal instruction. [Switching to Thread 802406400 (LWP 101771/ledger)] Error while running hook_stop: Invalid type combination in ordering comparison. 0x000000000042c1fb in ledger::amount_t::parse (this=0x7fffffffb200, str=@0x7fffffffb1c8, flags=0x2) at amount.cc:1226 1226 parse(stream, flags); gdb$ bt #0 0x000000000042c1fb in ledger::amount_t::parse (this=0x7fffffffb200, str=@0x7fffffffb1c8, flags=0x2) at amount.cc:1226 #1 0x000000000042d1a0 in ledger::parse_conversion (larger_str=@0x7fffffffb488, smaller_str=@0x7fffffffb470) at amount.cc:1234 #2 0x0000000000443b25 in _init_amounts (this=0x791e10) at amount.cc:91 #3 0x0000000000433495 in _init_amounts (this=0x791e10) at amount.cc:103 #4 0x0000000000421065 in __cxx_global_var_init3 () at amount.cc:126 #5 0x00000000004333f8 in global constructors keyed to a () at amount.cc:33 #6 0x00000000005516a2 in __do_global_ctors_aux () #7 0x0000000000404de6 in _init () #8 0x00007fffffffbb90 in ?? () #9 0x0000000800794691 in r_debug_state () from /libexec/ld-elf.so.1 #10 0x0000000800793d27 in __tls_get_addr () from /libexec/ld-elf.so.1 #11 0x0000000800792089 in .text () from /libexec/ld-elf.so.1 #12 0x0000000000000000 in ?? () gdb$
I would like to get this to work. For someone inexperienced in programming or porting, what can I do to help fix the issue?
Add maintainer back to PR (lost in conversion to buzilla) to give him a chance to answer the last question
As a workaround, USE_GCC=yes could be added to the Makefile. I have found that it does segfault when built with clang, but runs fine if build with gcc.
Created attachment 150914 [details] Update Ledger to version 3.1 I've found that updating to Ledger 3.1 solved the segmentation fault for me. I've attached a patch to the ports tree (untested on FreeBSD < 10).
Created attachment 152297 [details] Revised diff Hi, To make this update work on all supported FreeBSD versions I make some tweaks: - You should not remove USE_LDCONFIG, it is still needed - Looks like this new version needs a C++11 standard library, so I added the needed USES to achieve this. - The libedit library needs the .0 number to be attached or it will pick up the one included in base (where present) and fail to compile due to a missing header. Can you please test and review this new patch and also confirm the segfault really goes away? I'd like to get maintainer approval for this before committing. Thanks in advance!
Hi, thank you for cleaning up the patch, it looks good! With this revision 'ledger' still works as expected without segmentation faults (on FreeBSD current).
Committed.
A commit references this bug: Author: madpilot Date: Thu Feb 12 21:50:55 UTC 2015 New revision: 378899 URL: https://svnweb.freebsd.org/changeset/ports/378899 Log: - Update to 3.1 - Get distribution from github PR: 186518 Submitted by: chmiels@o2.pl Approved by: Maintainer timeout Changes: head/finance/ledger/Makefile head/finance/ledger/distinfo head/finance/ledger/files/ head/finance/ledger/pkg-plist