Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Halscope crash bug #2125

Open
pcw-mesa opened this issue Nov 3, 2022 · 8 comments
Open

Halscope crash bug #2125

pcw-mesa opened this issue Nov 3, 2022 · 8 comments

Comments

@pcw-mesa
Copy link
Collaborator

pcw-mesa commented Nov 3, 2022

Halscope in master has crashed multiple times when selecting the # of samples pane.
What is bad is that you must exit LinuxCNC to be able to run halscope again as you get
this error if you try to re-launch halscope from LinuxCNC:

HAL: ERROR: duplicate component name 'halscope'
SCOPE: ERROR: hal_init() failed

@SebKuzminsky
Copy link
Collaborator

SebKuzminsky commented Nov 3, 2022

I just spent a bunch of time in Halscope (running master on Debian Bullseye and Debian Bookworm on amd64), including changing the number of samples, and did not notice any problems. What platform did you see this on?

@pcw-mesa
Copy link
Collaborator Author

pcw-mesa commented Nov 3, 2022

X86, Mint 20.3
The times I have seen this happen are when halscope has been running for a long time (days)
I

dngarrett added a commit that referenced this issue Nov 3, 2022
Ref: #2125
(this commit does not address root cause for SEGV or FPE
signals but allows restart of halscope)
@pcw-mesa
Copy link
Collaborator Author

pcw-mesa commented Nov 4, 2022

Thanks, that will help.
BTW here's a backtrace, not sure if it of any use:

#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
#1  0x00007f930508ee95 in __vfprintf_internal
    (s=s@entry=0x7ffe1d515be0, format=format@entry=0x560f98f565d9 "%s\n%s", ap=ap@entry=0x7ffe1d515d60, mode_flags=mode_flags@entry=2) at vfprintf-internal.c:1688
#2  0x00007f93050a211a in __vsnprintf_internal (string=0x7ffe1d535330 "", maxlen=<optimized out>, 
    maxlen@entry=94, format=0x560f98f565d9 "%s\n%s", args=args@entry=0x7ffe1d515d60, mode_flags=mode_flags@entry=2)
    at vsnprintf.c:114
#3  0x00007f9305143fd1 in ___snprintf_chk
    (s=s@entry=0x7ffe1d535330 "", maxlen=maxlen@entry=94, flag=flag@entry=1, slen=slen@entry=94, format=format@entry=0x560f98f565d9 "%s\n%s") at snprintf_chk.c:38
#4  0x0000560f98f5205d in snprintf (__fmt=0x560f98f565d9 "%s\n%s", __n=94, __s=0x7ffe1d535330 "")
    at /usr/include/x86_64-linux-gnu/bits/stdio2.h:67
#5  draw_waveform (chan_num=<optimized out>, highlight=highlight@entry=1) at hal/utils/scope_disp.c:894
#6  0x0000560f98f52a82 in refresh_display () at hal/utils/scope_disp.c:258
#7  0x00007f9305b4f5ef in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#8  0x00007f9305af7ec3 in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#9  0x00007f9305491a56 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007f93054afdf1 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0

@SebKuzminsky
Copy link
Collaborator

The backtrace is helpful. Looks like the chan data structure is invalid or has unexpected contents somehow. Were you doing anything with halscope when it crashed? Or was it doing something by itself, like running a Rolling trigger?

@pcw-mesa
Copy link
Collaborator Author

pcw-mesa commented Nov 4, 2022

It had been running a rolling trigger for a day or so and
crashed when I pressed the samples button.

@SebKuzminsky
Copy link
Collaborator

@jepler's fix for @cradek's arm64 halscope crash is now in master, give it a try and see if it fixes this problem too.

@jepler
Copy link
Member

jepler commented Jan 27, 2023

based on this traceback I don't think it's fixed by my other change.

@jepler
Copy link
Member

jepler commented Jan 27, 2023

well, maybe it could be the same thing, since it's also trying to draw the "selected" trace when it crashes. When I first started looking at it, I thought (based on line numbers) that maybe format_scale_value was implicated, but now I don't think so; the line numbers are different now than the version where the problem was reported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants