I hSteps to reproduce:
I hope somebody at Garmin will read it, this will not fall through the cracks, and it will eventually make it to the developers of the SDK manager. Steps to reproduce:
On Ubuntu 18
apt install libwebkitgtk-1.0-0
Download SDK manager 4.0.6 for Linux
mkdir garmin-sdk
cd garmin-sdk
unzip ~/Downloads/connectiq-sdk-manager-linux.zip # assuming that is where you put it
bin/sdkmanager
agree to the license, then log in to your account
upon successful login, a brief 500 server error message is displayed
In gdb we see this:
gdb bin/sdkmanager
...
(gdb)run
Thread 1 "sdkmanager" received signal SIGSEGV, Segmentation fault.
____longjmp_chk () at ../sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S:130
130 ../sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S: No such file or directory.
(gdb) thread apply all bt
Thread 23 (Thread 0x7fff84f5b700 (LWP 22723)):
#0 0x00007ffff6f5fad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fffddc9f4dc)
at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x7fffddc9f488, cond=0x7fffddc9f4b0) at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x7fffddc9f4b0, mutex=0x7fffddc9f488) at pthread_cond_wait.c:655
#3 0x00007ffff177cf4b in WTF::ThreadCondition::timedWait(WTF::Mutex&, double) ()
from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#4 0x00007ffff2beae9b in ?? () from /usr/lib/x86_64-linux-gnu/libwebkitgtk-1.0.so.0
#5 0x00007ffff177c95a in ?? () from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#6 0x00007ffff6f596db in start_thread (arg=0x7fff84f5b700) at pthread_create.c:463
#7 0x00007ffff028f71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 18 (Thread 0x7fff6b7fe700 (LWP 22718)):
#0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1 0x00007ffff52b7a8a in g_cond_wait_until () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007ffff52445a1 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007ffff5244b5c in g_async_queue_timeout_pop () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007ffff5299d4e in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007ffff52992a5 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007ffff6f596db in start_thread (arg=0x7fff6b7fe700) at pthread_create.c:463
#7 0x00007ffff028f71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 14 (Thread 0x7fff86dc0700 (LWP 22714)):
#0 0x00007ffff0282cb9 in __GI___poll (fds=0x110e800, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007ffff52716e9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007ffff52717fc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007fff86dc836d in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4 0x00007ffff52992a5 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007ffff6f596db in start_thread (arg=0x7fff86dc0700) at pthread_create.c:463
#6 0x00007ffff028f71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x7fffdc8e2fe0, cond=0x7fffdc8e3008) at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x7fffdc8e3008, mutex=0x7fffdc8e2fe0) at pthread_cond_wait.c:655
#3 0x00007ffff745a8bc in std::condition_variable::wait(std::unique_lock<std::mutex>&) ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff1492eeb in JSC::GCThread::waitForNextPhase() ()
from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#5 0x00007ffff1492fd8 in JSC::GCThread::gcThreadMain() ()
from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#6 0x00007ffff177c95a in ?? () from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#7 0x00007ffff6f596db in start_thread (arg=0x7fff877fe700) at pthread_create.c:463
#8 0x00007ffff028f71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 12 (Thread 0x7fff87fff700 (LWP 22712)):
#0 0x00007ffff6f5fad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fffdc8e3034)
at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x7fffdc8e2fe0, cond=0x7fffdc8e3008) at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x7fffdc8e3008, mutex=0x7fffdc8e2fe0) at pthread_cond_wait.c:655
#3 0x00007ffff745a8bc in std::condition_variable::wait(std::unique_lock<std::mutex>&) ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff1492eeb in JSC::GCThread::waitForNextPhase() ()
from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#5 0x00007ffff1492fd8 in JSC::GCThread::gcThreadMain() ()
from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#6 0x00007ffff177c95a in ?? () from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#7 0x00007ffff6f596db in start_thread (arg=0x7fff87fff700) at pthread_create.c:463
#8 0x00007ffff028f71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 11 (Thread 0x7fff8ce80700 (LWP 22711)):
#0 0x00007ffff6f5fad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fffdc8e3034)
at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x7fffdc8e2fe0, cond=0x7fffdc8e3008) at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x7fffdc8e3008, mutex=0x7fffdc8e2fe0) at pthread_cond_wait.c:655
#3 0x00007ffff745a8bc in std::condition_variable::wait(std::unique_lock<std::mutex>&) ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff1492eeb in JSC::GCThread::waitForNextPhase() ()
from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#5 0x00007ffff1492fd8 in JSC::GCThread::gcThreadMain() ()
from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#6 0x00007ffff177c95a in ?? () from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#7 0x00007ffff6f596db in start_thread (arg=0x7fff8ce80700) at pthread_create.c:463
#8 0x00007ffff028f71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 10 (Thread 0x7fff8d681700 (LWP 22710)):
#0 0x00007ffff6f60065 in futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fff8d680b30,
expected=0, futex_word=0x7fffdc8d927c) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1 __pthread_cond_wait_common (abstime=0x7fff8d680b30, mutex=0x7fffdc8d9228, cond=0x7fffdc8d9250)
at pthread_cond_wait.c:539
#2 __pthread_cond_timedwait (cond=0x7fffdc8d9250, mutex=0x7fffdc8d9228, abstime=0x7fff8d680b30)
at pthread_cond_wait.c:667
#3 0x00007ffff1491938 in JSC::BlockAllocator::waitForDuration(std::chrono::duration<long, std::ratio<1l, 1000l> >)
() from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#4 0x00007ffff14919f8 in JSC::BlockAllocator::blockFreeingThreadMain() ()
from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#5 0x00007ffff177c95a in ?? () from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#6 0x00007ffff6f596db in start_thread (arg=0x7fff8d681700) at pthread_create.c:463
#7 0x00007ffff028f71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 9 (Thread 0x7fffdc876700 (LWP 22709)):
#0 0x00007ffff6f5fad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fffdc881cec)
at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x7fffdc881c98, cond=0x7fffdc881cc0) at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x7fffdc881cc0, mutex=0x7fffdc881c98) at pthread_cond_wait.c:655
#3 0x00007ffff28a446b in ?? () from /usr/lib/x86_64-linux-gnu/libwebkitgtk-1.0.so.0
#4 0x00007ffff28a605d in ?? () from /usr/lib/x86_64-linux-gnu/libwebkitgtk-1.0.so.0
#5 0x00007ffff177c95a in ?? () from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#6 0x00007ffff6f596db in start_thread (arg=0x7fffdc876700) at pthread_create.c:463
#7 0x00007ffff028f71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 8 (Thread 0x7fffdd179700 (LWP 22708)):
#0 0x00007ffff02527a0 in __GI___nanosleep (requested_time=requested_time@entry=0x7fffdd178b70,
remaining=remaining@entry=0x7fffdd178b70) at ../sysdeps/unix/sysv/linux/nanosleep.c:28
#1 0x00007ffff025267a in __sleep (seconds=0) at ../sysdeps/posix/sleep.c:55
#2 0x00007ffff1762314 in WTF::TCMalloc_PageHeap::scavengerThread() ()
from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#3 0x00007ffff1762399 in WTF::TCMalloc_PageHeap::runScavengerThread(void*) ()
from /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-1.0.so.0
#4 0x00007ffff6f596db in start_thread (arg=0x7fffdd179700) at pthread_create.c:463
#5 0x00007ffff028f71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 5 (Thread 0x7fffdfa02700 (LWP 22705)):
#0 0x00007ffff0282cb9 in __GI___poll (fds=0xeee560, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007ffff52716e9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007ffff5271a82 in g_main_loop_run () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007ffff560b2d6 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4 0x00007ffff52992a5 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007ffff6f596db in start_thread (arg=0x7fffdfa02700) at pthread_create.c:463
#6 0x00007ffff028f71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 4 (Thread 0x7fffe0203700 (LWP 22704)):
#0 0x00007ffff0282cb9 in __GI___poll (fds=0x7fffd801a050, nfds=2, timeout=-1)
at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007ffff52716e9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007ffff52717fc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007ffff5271841 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007ffff52992a5 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007ffff6f596db in start_thread (arg=0x7fffe0203700) at pthread_create.c:463
#6 0x00007ffff028f71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 1 (Thread 0x7ffff7f8af00 (LWP 22697)):
#0 ____longjmp_chk () at ../sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S:130
#1 0x67fa6a8b124b7f41 in ?? ()
Backtrace stopped: Cannot access memory at address 0x6bf0ec8493d3f0ee
So clearly we are dealing with some kind of memory overrun/corruption. I hope you can fix the bug. I would also like to offer some feedback on how to avoid such problems as I believe this is the result of some poor decision making in the area of choosing the tools to do the job:
- Why in the world would you write a tool to download the the SDK in C++? A GUI tool in C++ - in addition to adding the extra development time has a problem of being dependent on many libraries. In this particular case, the number is 122. Those libraries change from distro to distro intoducting all kinds of instability. I would recommend that you write it in a scripting language like Python using either QT or GTK bindings.
- It would be very helpful if the GUI tool was a wrapper around a command-line utility with well-documented interface. This way if GUI blows up, at least there is a command-line workaround to get the job done.
- Any reason the SDK manager could not be open-source? If it was, I would have sent you the fix for this already.
- How much testing did this go through before you released it? Ubuntu 18 is not that rare of system, should have been tested.
All in all, this type of experience is a big turn-off to a skilled engineer that is considering working for Garmin. A crash like this with no workaround short of changing the OS makes a skilled engineer do some thorough debugging which reveals not so thorough technical decisions behind the product. You cannot hide it with closed source. And who would want to work on a team that produced this? I hope this forum exists because you sincerely desire to hear from the users rather than to just say you have a forum, and somebody at Garmin will do something to improve this situation.