[CRIU] About thread names after restore
Pavel Emelyanov
xemul at parallels.com
Tue Aug 25 04:17:08 PDT 2015
On 08/25/2015 02:02 PM, Artem Kuzmitskiy wrote:
>
>
> 2015-08-25 12:37 GMT+03:00 Pavel Emelyanov <xemul at parallels.com <mailto:xemul at parallels.com>>:
>
> On 08/25/2015 10:50 AM, Artem Kuzmitskiy wrote:
> >
> >
> > 2015-08-21 20:57 GMT+03:00 Pavel Emelyanov <xemul at parallels.com <mailto:xemul at parallels.com> <mailto:xemul at parallels.com <mailto:xemul at parallels.com>>>:
> >
> > On 08/18/2015 06:32 PM, Artem Kuzmitskiy wrote:
> > > Hi all,
> > >
> > > I'm not sure what it's important, but I found that thread names (if were
> > > assigned using prctl\pthread_setname) not restored. Is it bug or not?
> >
> > Well, if criu doesn't support something, then it's definitely a bug, but
> > we don't call it such. Not-yet-implemented-feature.
> >
> > Ок.
> >
> > > Steps for reproduce:
> > > 1. Start thread and assign name.
> > > pthread_create(&thread, NULL, do_nothing, NULL);
> > > pthread_setname_np(thread, "NOTHING_THREAD");
> > > 2. Check name using procfs
> > > $ cat /proc/12857/task/12858/stat
> > > 12858 (NOTHING_THREAD) .....
> > > 3. Dump process with this thread
> > > 4. Restore process
> > > 5. Check again
> > > cat /proc/12857/task/12858/stat
> > > 12858 (socketpair) .....
> > >
> > > P.S. In pstree.img not include the thread names now, only tid.
> >
> > Yup. Patch for this is warmly welcome.
> >
> > I feel that this is part of parasite code?
>
> For restore -- yes, threads are restored in parasite, so name restore should also go there.
>
> On first look, these data may be inserted to pstree.img in threads section Am I right?
>
> -----------
> # ../../../crit decode -i pstree.img
> {"magic": "PSTREE", "entries": [{"pgid": 12857, "threads": [12857, 12858], "ppid": 0, "pid": 12857, "sid": 12857}]}
> -----------
No, task's names sit in core.img: core_entry.tc.comm, so thread name should go to
the same image. Each thread has it's own core.img.
-- Pavel
More information about the CRIU
mailing list