2023-08-25 GnuCash IRC logs

00:11:59 *** cproo12 has joined #gnucash
00:12:00 *** ChanServ sets mode: +v cproo12
00:12:26 *** cproo12 has quit IRC
00:21:40 *** NoobAlice has quit IRC
00:27:04 *** crcvxc has quit IRC
01:43:33 *** fell has quit IRC
01:44:53 *** fell has joined #gnucash
01:44:53 *** ChanServ sets mode: +o fell
02:27:04 *** raeburn has joined #gnucash
02:27:04 *** ChanServ sets mode: +v raeburn
03:33:22 *** gjanssens has joined #gnucash
03:33:23 *** ChanServ sets mode: +o gjanssens
06:28:24 *** rzerres has joined #gnucash
06:39:00 *** rzerres has quit IRC
06:49:12 *** bertbob has quit IRC
06:52:01 *** bertbob has joined #gnucash
06:52:01 *** ChanServ sets mode: +v bertbob
07:40:18 *** Aussie_matt has joined #gnucash
08:53:42 *** warlord has joined #gnucash
08:53:42 *** gncbot sets mode: +o warlord
10:37:14 *** jervin has joined #gnucash
11:18:00 *** NoobAlice has joined #gnucash
11:29:16 *** bertbob has quit IRC
11:36:30 *** bertbob has joined #gnucash
11:36:30 *** ChanServ sets mode: +v bertbob
11:39:16 *** jervin has quit IRC
12:28:37 *** palerider has joined #gnucash
12:29:30 *** palerider has left #gnucash
13:10:12 *** warlord has quit IRC
13:41:23 *** miklcct has quit IRC
13:46:26 *** miklcct has joined #gnucash
13:46:26 *** ChanServ sets mode: +v miklcct
15:27:59 *** ArtGravity has joined #gnucash
15:27:59 *** ChanServ sets mode: +v ArtGravity
15:33:20 *** gandalf1 has joined #gnucash
15:33:47 *** gandalf has quit IRC
15:33:47 *** gandalf1 is now known as gandalf
16:05:58 *** gjanssens has quit IRC
16:28:27 *** jervin has joined #gnucash
17:49:04 *** jervin has quit IRC
17:52:55 *** Robert847 has joined #gnucash
17:52:56 *** ChanServ sets mode: +v Robert847
17:56:53 <Robert847> Hi. I am finally actually working on debugging my gnucash crash. I attached gdb to the process, started Since last run and gdb reported Thread 1 "gnucash" received signal SIGSEGV, Segmentation fault.
17:56:53 <gncbot> Robert847: Sent 1 week, 0 days, 6 hours, and 40 minutes ago: <Simon> you should run gnucash normally; you can then attach with a gdb that's running as root
17:56:54 <Robert847> 0x00007f8a189904d6 in gnc_sx_instance_model_effect_change () from /usr/lib/x86_64-linux-gnu/gnucash/libgnc-app-utils.so
17:59:55 <jralls> Robert847 Are there a few lines of assembly after that?
18:02:19 <Robert847> no. Trying to enter 'backtrace full' into gdb I got Backtrace stopped: Cannot access memory at address 0x7ffd88796788
18:06:52 <jralls> what about `info frame`?
18:08:18 <Robert847> tack level 0, frame at 0x7ffd88796790:
18:08:18 <Robert847> rip = 0x7f8a189904d6 in gnc_sx_instance_model_effect_change; saved rip = <not saved>
18:08:18 <Robert847> Outermost frame: Cannot access memory at address 0x7ffd88796788
18:08:18 <Robert847> Cannot access memory at address 0x7f8a18990240
18:10:20 <Robert847> I think i directed gdb to store something at the start line which was 'sudo gdb 2>&1 | tee gdb-gnucash.txt
18:10:20 <Robert847> "
18:11:37 <jralls> That should display everything and also log it to that file.
18:12:14 <Robert847> Now I need to find that file
18:13:01 <jralls> It should be in your pwd. Try info threads to gdb, maybe it's looking at the wrong one.
18:17:20 <Robert847> Id Target Id Frame
18:17:20 <Robert847> * 1 Thread 0x7f8a0cfa4b00 (LWP 4766) "gnucash" 0x00007f8a189904d6 in gnc_sx_instance_model_effect_change () from /usr/lib/x86_64-linux-gnu/gnucash/libgnc-app-utils.so
18:17:20 <Robert847> 2 Thread 0x7f8a0bdff640 (LWP 4769) "gmain" Couldn't get registers: No such process.
18:18:30 <Robert847> I did find the file, it currently has 116 lines including the last few above.
18:20:07 <Robert847> I suspect there is not enough information from this try to find the source of the seg fault
18:21:50 <jralls> Don't give up yet. Try `disass gnc_sx_instance_model_effect_change` . It will spew several hundred lines, so make sure you have plenty of scrollback buffer in your term.
18:22:38 <jralls> Scroll back and find the offset e.g. <+496> for 0x7f8a189904d6
18:23:48 <Robert847> Hmmm. my term might run out of buffer?
18:23:49 <jralls> I can find that offset in my disassembly and maybe figure out what it's trying to dereference.
18:25:11 <Robert847> I think the file gdb-gnucash.txt should have lots of room, Ihope
18:25:58 <Robert847> here goes...
18:26:47 <jralls> Yeah, that can be a fallback. In the terminal preferences pick the current profile (probably "Unnamed") and then the scrolling tab. The buffer size is labeled "limit scrollback to".
18:27:18 <Robert847> Well, there was plenty of room the respnse was "Dump of assembler code for function gnc_sx_instance_model_effect_change:
18:27:18 <Robert847> 0x00007f8a18990240 <+0>:
18:27:18 <Robert847> Cannot access memory at address 0x7f8a18990240
18:27:18 <Robert847> "
18:28:52 <jralls> Wow. That's impressively wedged.
18:29:29 <Robert847> That went way over my head
18:30:32 <jralls> Had GnuCash already crashed when you attached gdb?
18:33:10 <Robert847> I don't think so. Gnucash allowed me to select Since Last Run from the menu after I attached gdb. Then Ubuntu kept telling mr that it was not responding
18:33:43 <Robert847> I have already taken the option to quit gnucash anyway
18:34:29 <jralls> Um, you mean kill it from gdb?
18:35:32 <Robert847> no, I killed it from the Ubuntu window that told me Gnucash was not responding.
18:36:56 <Robert847> I am not sure where that pop-up comes from but it appears when gnucash gets slow
18:37:36 <jralls> It comes from a process monitor. Did you do that before trying to get the backtrace from gdb?
18:38:38 <Robert847> Now I am not 100 percent sure but I thought I tried to get the backtrace first.
18:40:17 <jralls> Because once you kill it the memory gets recovered and gdb doesn't have anything to work with.
18:41:12 <Robert847> I remember gdb not finding things so I started htop and saw the process was still in memory but not using cpu although it accumulated over an hour previously. I had it open for a couple of days
18:43:00 <Robert847> It is still listed in htop but now it has 0 in the various columns
18:43:41 <jralls> It doesn't use cpu when it's sitting at a gdb prompt. It also doesn't respond to the process monitor, so you get that "not responding" popup.
18:44:21 <jralls> You can tell gdb `detach` or just quit it and it will remove the process from htop.
18:44:33 <Robert847> ok I am doing this for my first time
18:48:01 <Robert847> I have enough time to try again now
18:49:16 <jralls> OK, go ahead.
18:50:49 <Robert847> when GnuCsh started there was alreday an asterisk in front of the filename. I have SLR configured to not run on startup
18:51:17 <Robert847> what else could cause the asterisk?
18:53:33 <jralls> A scrub.
18:56:04 <Robert847> I am not using trading accounts. What triggers a scrub?
18:56:57 <jralls> Not that kind of scrub. A check-and-repair scrub. Most of them run when you load your file.
18:58:51 <Robert847> I would say that happens more than once a week on this file. is there a way to find out what the scrub did?
19:01:27 <Robert847> or do I need to start Gnucash in gdb?
19:03:19 <jralls> The easiest way would be to save immediately then diff (or zdiff if you have compression enabled) the file with the most recent backup.
19:05:08 <Robert847> Another thing I haven't done before. I would rather find out why SLR ca=rashes first.
19:05:53 <Robert847> I am already down too many other rabbit holes
19:08:25 <jralls> OK. I have to go in about 20 minutes.
19:17:13 <Robert847> when I try to attach gdb the last few lines are
19:17:18 <Robert847> [Thread debugging using libthread_db enabled]
19:17:18 <Robert847> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
19:17:18 <Robert847> 0x00007f6654d18d7f in __GI___poll (fds=0x559dc1949520, nfds=11, timeout=10000) at ../sysdeps/unix/sysv/linux/poll.c:29
19:17:18 <Robert847> 29 ../sysdeps/unix/sysv/linux/poll.c: No such file or directory.
19:17:39 <Robert847> did it fail to attach?
19:18:48 <Robert847> if so, I will try again another time
19:20:12 <jralls> No, just say `continue` and keep going. It's just telling you that it doesn't have the kernel sources.
19:23:25 <Robert847> ok. after selecting Since Last Run gdb responded
19:23:35 <Robert847> (gdb) continue
19:23:35 <Robert847> Continuing.
19:23:35 <Robert847> Thread 1 "gnucash" received signal SIGSEGV, Segmentation fault.
19:23:35 <Robert847> 0x00007f66556064d6 in gnc_sx_instance_model_effect_change () from /usr/lib/x86_64-linux-gnu/gnucash/libgnc-app-utils.so
19:24:10 <jralls> ok, now try `info frame`
19:25:12 <Robert847> here is the response
19:25:15 <Robert847> (gdb) info frame
19:25:15 <Robert847> Stack level 0, frame at 0x7ffce3931d40:
19:25:15 <Robert847> rip = 0x7f66556064d6 in gnc_sx_instance_model_effect_change;
19:25:15 <Robert847> saved rip = 0x7f6656276329
19:25:15 <Robert847> called by frame at 0x7ffce3931da0
19:25:15 <Robert847> Arglist at 0x7ffce3931c98, args:
19:25:15 <Robert847> Locals at 0x7ffce3931c98, Previous frame's sp is 0x7ffce3931d40
19:25:16 <Robert847> Saved registers:
19:25:17 <Robert847> rbx at 0x7ffce3931d08, rbp at 0x7ffce3931d10, r12 at 0x7ffce3931d18,
19:25:19 <Robert847> r13 at 0x7ffce3931d20, r14 at 0x7ffce3931d28, r15 at 0x7ffce3931d30,
19:25:21 <Robert847> rip at 0x7ffce3931d38
19:25:22 <Robert847>
19:26:23 <jralls> Good. Now try `disass`
19:27:26 <Robert847> that got a lengthy response
19:28:33 <Robert847> should I copy it here or find a better way to copy it to you?
19:28:34 <jralls> Good again. Scroll back and look for 0x00007f66556064d6. There may be a little arrow next to it or on a nearby line.
19:30:18 <Robert847> found it
19:30:39 <jralls> What's the offset?
19:31:10 <Robert847> 0x00007f66556064d6 <+662>
19:31:48 <Robert847> is this it?
19:37:16 <jralls> Yeah. What version of GnuCash are you on?
19:38:14 <Robert847> Release 4.8 from the ppa iirc
19:38:54 <Robert847> cant look directly right now, its frozen
19:42:38 <Robert847> synaptic reports 1:4.8-1build2
19:44:10 <jralls> Can you install debug symbols? https://wiki.ubuntu.com/Debug%20Symbol%20Packages
19:45:34 <jralls> The crash point is in the loop over the SXes so it indicates that there's an SX with a bad value, but I can't tell which one from just the disassembly.
19:45:54 <jralls> It's also past time for me to go, so we'll have to continue some other time.
19:48:24 <Robert847> ok bye
20:04:21 *** ArtGravity has quit IRC
20:28:43 *** crcvxc has joined #gnucash
21:33:35 *** cproo12 has joined #gnucash
21:33:35 *** ChanServ sets mode: +v cproo12
21:39:46 *** cproo12 has quit IRC
22:19:02 *** chris_ has joined #gnucash
22:19:02 *** gncbot sets mode: +o chris_
22:24:55 *** jervin has joined #gnucash
23:03:14 *** jervin has quit IRC