Forum > Operating Systems

using RunCommand to wrap LXD linux container crashes

<< < (2/6) > >>

MarkMLl:
Note that I said gdbserver, not gdb.


--- Quote from: nomorelogic on February 06, 2025, 07:33:53 pm ---Looks like RunCommand did its job.

--- End quote ---

Maybe. Can you see the program's parameters etc. in its /proc entry?

MarkMLl

nomorelogic:
I guess I don't know how to use gdbserver now...  :-[

in /proc I find this


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---root@myhost:/proc/7681# cat cmdline /usr/bin/lxcinitubuntu:20.04u1 
I do not know whether it is normal that in cmdline the arguments do not have the space as separator.
However the command is present in proc.


Edit:

this is the output of "lxc monitor" until the crash


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---# lxc monitor --type=logging --prettyDEBUG  [2025-02-07T09:18:42+01:00] Event listener server handler started         id=0291e421-5d89-4bb2-8652-c739d874f13f local=/var/lib/lxd/unix.socket remote=@DEBUG  [2025-02-07T09:18:46+01:00] Handling API request                          ip=@ method=GET protocol=unix url=/1.0 username=rootDEBUG  [2025-02-07T09:18:46+01:00] Handling API request                          ip=@ method=GET protocol=unix url="/1.0/instances?filter=&recursion=2" username=rootDEBUG  [2025-02-07T09:18:46+01:00] GetInstanceUsage started                      instance=m1 project=defaultDEBUG  [2025-02-07T09:18:46+01:00] GetInstanceUsage finished                     instance=m1 project=defaultDEBUG  [2025-02-07T09:19:05+01:00] Handling API request                          ip=@ method=GET protocol=unix url=/1.0 username=rootDEBUG  [2025-02-07T09:19:05+01:00] Handling API request                          ip=@ method=GET protocol=unix url="/1.0/instances?filter=&recursion=2" username=rootDEBUG  [2025-02-07T09:19:05+01:00] GetInstanceUsage started                      instance=m1 project=defaultDEBUG  [2025-02-07T09:19:05+01:00] GetInstanceUsage finished                     instance=m1 project=default 

MarkMLl:

--- Quote from: nomorelogic on February 07, 2025, 09:10:57 am ---I guess I don't know how to use gdbserver now...  :-[

--- End quote ---

Allowing that you've probably moved from the problem being inside the Pascal program to its being inside the one you're invoking, it might not be directly relevant. However I felt that I did have to draw your attention to the distinction, because it's what you need it you're trying to debug something that either runs as root or has to have POSIX capabilities set (which is a much more controlled way of doing things).


--- Quote ---in /proc I find this


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---root@myhost:/proc/7681# cat cmdline /usr/bin/lxcinitubuntu:20.04u1 
I do not know whether it is normal that in cmdline the arguments do not have the space as separator.

--- End quote ---

Try piping the output through xxd, since cat won't show embedded /0 characters which might be being used as the delimiter.

MarkMLl

nomorelogic:
thank you for your suggestions
I will try to learn more about dbgserver

launch parameters seems corrects using xxd


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---# xxd /prov/16065/cmdline 00000000: 2f75 7372 2f62 696e 2f6c 7863 0069 6e69  /usr/bin/lxc.ini00000010: 7400 7562 756e 7475 3a32 302e 3034 0075  t.ubuntu:20.04.u00000020: 3100 2d2d 6465 6275 6700                 1.--debug. 
I'm thinking that, as soon as possible, I'll look into some lxd forums
I will update here if I find anything useful

MarkMLl:

--- Quote from: nomorelogic on February 07, 2025, 12:04:08 pm ---I will try to learn more about dbgserver

--- End quote ---

gdbserver.

OK, so you can see /0 separators so things are getting that far.

MarkMLl

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version