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

When name is null, it will coredump #1412

Open
yinshuisiquan opened this issue Mar 17, 2021 · 3 comments
Open

When name is null, it will coredump #1412

yinshuisiquan opened this issue Mar 17, 2021 · 3 comments

Comments

@yinshuisiquan
Copy link

if (prev_mntns_fd && ui->name[0] && ui->ue->mnt_id >= 0) {

http://www.gnu.org/software/gdb/documentation/.
For help, type "help" .
Type "apropos word" to search for commands related to "word" ...
Reading symbols from /usr/sboin/criu..Reading sywbols fron /usr/lib/debug/.build-id/b4/8507ab6614613facdcc8b7edeb1a948a54e550.debug...done.
done.
[New LWP 132]
[New LwP 215]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by 'criu restore --images-dir /host/nsr/checkpoints/pt-26210316_154236 -v4 -j --tcp'.
Program terminated with signal SIGSEGV,Segmentation fault.
#0 0x00005646bbc96a3a in prep_unix_sk_cwd(ui=ui@entry=0x7f76e85bda50, prev_cwd_fd=prev_cwd_fd@entry=0x7fff390bfedc, prev_root_fd=prev_root_fd@entry=0x7fff390bfee0, prev_mntns_fd=prev_mntns_fd@entry=0x7fff390bfee4) at criu/sk-unix.c:1197
1197 criu/sk-unix.c: No such file or directory.
[Current thread is 1 (LWP 132)]
(gdb) bt
#0 0x00005646bbc96a3a in prep_unix_sk_cwd(ui=ui@entry=0x7f76e85bda50, prev_cwd_fd=prev_cwd_fd@entry=0x7fff390bfedc, prev_root_fd=prev_root_fd@entry=0x7fff390bfee0, prev_mntns_fd=prev_mntns_fd@entry=0x7fff390bfee4) at criu/sk-unix.c:1197
#1 0x00005646bbc99d77 in post_open_standalone (fd=18,d=0x7f76e85bdb88) at criu/sk-unix.c:1308
#2 open_unixsk standalone (new_fd=coptimized out>,ui=x7f76e85bdb40) at criu/sk-unix.c:1800
#3 open_unix_sk(d=0x7f76e85bdb88,new_fd=) at criu/sk-unix.c:1960
#4 0x00005646bbc51469 in open_fd (fle=0x7f76e85b7800) at criu/files.c:1157
#5 open_fdinfos (me=0x7f76e85e62b8)at criu/files.c:1213
#6 prepare_fds (me=0x7f76e85e62b8) at criu/files.c:1321
#7 Gx0085646bbc433e in restore_one_ alive task(pid=132,core=core@entry=0x5646bd392e18) at criu/cr-restore.c:904
#8 0x60005646bbc428ed in restore_one_task (core=0x5646bd392e10,pid=) at criu/cr-restore.c:1274
#9 restore_task with children (_arg=0x7fff390c0610) at criu/cr-restore.c:1948
#10 0x00007f76e7316d0f in clone () from /lib/x86_64-linux-gnu/libc.so.6
(gdb)

@Snorch
Copy link
Member

Snorch commented Apr 13, 2021

You should provide full criu logs and coredump + binary or reproduce.

Looking on the code a bit, I can't get how peer of standalone socket can have zero ->name pointer. To be able to create "standalone" socket with peer, one need to connect to a listening unix socket AFAICS. To be able to connect the listening socket should be bind to some address which would be it's name. And after accept new peer socket is created copying the name from the listening socket...

Probably I'm missing something...

@mihalicyn @cyrillos please also take a look.

@yinshuisiquan
Copy link
Author

When the server in the container, and the client outside the container, and I use criu in the container, it will be happened

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

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

No branches or pull requests

2 participants