[ / / / / / / / / / / / / / ] [ dir / agatha2 / dempart / doomer / imouto / lovelive / pdfs / xivlg ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Email
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

File (hide): 99f980acdb36cd3⋯.png (154.49 KB, 336x508, 84:127, gdb.png) (h) (u)

File (hide): efd07fe09aee9c4⋯.png (235.21 KB, 1408x2176, 11:17, super-hard-threading.png) (h) (u)

[–]

 No.1034426[Watch Thread][Show All Posts]

DISASTER, anon: your multithreaded application has deadlocked!

you probably should've used Erlang, anon. There's no way you're going to fix this in a timely manner.

This is one of them compiled languages. Have fun adding a bunch of print statements just to try and see what's going on.

pic related.

$ gdb -q -p 2971
Attaching to process 2971
[New LWP 2972]
[New LWP 2973]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

warning: Loadable section ".note.gnu.property" outside of ELF segments
futex_wait_cancelable (private=0, expected=0, futex_word=0x13bc3f0)
at ../sysdeps/unix/sysv/linux/futex-internal.h:88
88 int err = lll_futex_timed_wait (futex_word, expected, NULL, private);
(gdb) info functions bob
All functions matching regular expression "bob":

File deadlock.adb:
void <deadlock__bobTK__L_3__B51b__numA>(void);
void <deadlock__bobTK__L_3__B51b__set_numA1>(void);
void <deadlock__bobTK__L_3__B51b__stopA2>(void);
void deadlock.bob(struct {...} * const);
(gdb) break deadlock__bobTK__L_3__B51b__numA.5380
Breakpoint 1 at 0x405728: file deadlock.adb, line 43.
(gdb) continue
Continuing.
[Switching to Thread 0x7f231ef8c700 (LWP 2973)]

Thread 3 "bob" hit Breakpoint 1, <deadlock__bobTK__L_3__B51b__numA> () at deadlock.adb:43
43 accept Num (N : out Natural) do
(gdb) display increment
1: increment = 4
(gdb) set increment := 1
(gdb) continue
Continuing.

Thread 3 "bob" hit Breakpoint 1, <deadlock__bobTK__L_3__B51b__numA> () at deadlock.adb:43
43 accept Num (N : out Natural) do
1: increment = 1
(gdb) info break
Num Type Disp Enb Address What
1 breakpoint keep y 0x0000000000405728 in <deadlock__bobTK__L_3__B51b__numA>
at deadlock.adb:43
breakpoint already hit 2 times
(gdb) delete 1
(gdb) continue
Continuing.
[Thread 0x7f231ef8c700 (LWP 2973) exited]
[Thread 0x7f231f191700 (LWP 2972) exited]
[Inferior 1 (process 2971) exited normally]
feel free to praise gdb in the context of C, C++, D, Go, Objective-C, OpenCL C, Fortran, Pascal, Rust, or Modula-2. Or an unsupported language that the 'minimal' pseudolang can manage with.

 No.1034428>>1034430

Why are you treating a debugger as something so profound?


 No.1034429

or with a oneliner:

$ gdb -p 3787 -batch -ex 'break -source deadlock.adb -line 25' -ex continue -ex 'set count := 33' -ex continue
[New LWP 3788]
[New LWP 3789]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

warning: Loadable section ".note.gnu.property" outside of ELF segments
futex_wait_cancelable (private=0, expected=0, futex_word=0x6483f0) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
88 int err = lll_futex_timed_wait (futex_word, expected, NULL, private);
Breakpoint 1 at 0x405376: file deadlock.adb, line 25.
[Switching to Thread 0x7fec74b7a700 (LWP 3788)]

Thread 2 "alice" hit Breakpoint 1, deadlock.alice (<_task>=0x7ffe0867d6d8) at deadlock.adb:25
25 Put_Line ("new count: " & Natural'Image (Count));
[Thread 0x7fec74975700 (LWP 3789) exited]
[Thread 0x7fec74b7a700 (LWP 3788) exited]
[Inferior 1 (process 3787) exited normally]


 No.1034430

>>1034428

yeah, yeah, no tech is profound. it's all boring technical stuff. why are you here instead of chasing women or running for political office or dogpiling haters on social media?




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
3 replies | 0 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / agatha2 / dempart / doomer / imouto / lovelive / pdfs / xivlg ][ watchlist ]