|
From: Nalli, S. <san...@hp...> - 2014-05-30 01:24:20
|
Hi, So I start UML with the cmdline ./linux rootfstype=hostfs rw mem=1G init=/bin/bash When the bash shell comes up, I run my prog : ./my_prog 6173 pts/8 00:00:00 linux 6180 pts/8 00:00:00 linux 6181 pts/8 00:00:00 linux 6182 pts/8 00:00:00 linux 6183 pts/8 00:00:00 linux 6188 pts/8 00:00:13 linux The last item in the list with PID is 6188 is my program. I can tell because my_prog increments a counter in an infinite loop And consumes CPU cycles. It shows up on "top" as the dominant process. My question: 1. /proc/6188/exe is invalid. Why ?? I mean, it doesn't point to anything. Shouldn't it point to my_prog or something ? 2. What do the 4 UML processes 6173, 6180, 6181, 6182 do ? (6183 is /bin/bash whos "exe" symlink is also doesn't point to anything !!) 3. When a UML process, say my_prog (PID 6188) makes a system call, where is the system call executed - is it within the addr space of 6173 (the UML kernel process) or 6188 (my_prog running in UML ??) -Sanketh |
|
From: enjoy m. <enj...@gm...> - 2014-05-30 07:06:01
|
let me answer your second question.
I did this analysis with kernel linux-3.12.6:
1) make ARCH=um cscope
2) search functions which called 'clone'
File Function Line
0 ubd_user.c start_io_thread 43 pid = clone(io_thread, (void *) sp,
CLONE_FILES |
CLONE_VM, NULL);
1 helper.c start_io_thread 74 pid = clone(helper_child, (void *) sp,
CLONE_VM, &data);
2 helper.c start_io_thread 124 pid = clone(proc, (void *) sp, flags,
arg);
3 process.c start_userspace 300 pid = clone(userspace_tramp, (void *) sp,
flags, (void *)
stub_stack);
4 lguest.c create_thread 1048 vq->thread = clone(do_thread, stack +
32768, CLONE_VM |
SIGCHLD, vq);
3) insert some printk statement in those function
4) build and run, then watch the booting process output
[root@localhost ~]# dmesg | grep 6436
[ 0.190000] run_helper_thread : clone success, pid = 6436
[root@localhost ~]# dmesg | grep 6437
[ 0.190000] start_io_thread - clone success : pid = 6437
[root@localhost ~]# dmesg | grep 6438
[ 0.190000] run_helper_thread : clone success, pid = 6438
[real@real runuml]$ ps -ef | grep patch
real 6423 1553 6 16:17 pts/0 00:00:02 ./linux_patched
ubda=./Fedora20-x86-root_fs mem=256m
real 6436 6423 0 16:17 pts/0 00:00:00 ./linux_patched
ubda=./Fedora20-x86-root_fs mem=256m
real 6437 6423 0 16:17 pts/0 00:00:00 ./linux_patched
ubda=./Fedora20-x86-root_fs mem=256m
real 6438 6423 0 16:17 pts/0 00:00:00 ./linux_patched
ubda=./Fedora20-x86-root_fs mem=256m
real 6439 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6459 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6479 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6492 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6565 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6567 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6572 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6573 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6576 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6605 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6619 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6621 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6707 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6715 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6765 6423 0 16:18 pts/0 00:00:00 [linux_patched]
[root@localhost ~]# dmesg | grep proc
[ 0.090000] run_helper_thread : clone success, pid = 8387, proc=0806471d
[ 0.100000] run_helper_thread : clone success, pid = 8389, proc=080663a3
[real@real linux-3.12.6]$ grep 0806471d System.map
0806471d t aio_thread
[real@real linux-3.12.6]$ grep 080663a3 System.map
080663a3 t write_sigio_thread
so, the four processes are:
1) uml kernel main thread
2) aio_thread
3) io_thread
4) write_sigio_thread
On Fri, May 30, 2014 at 9:22 AM, Nalli, Sanketh <san...@hp...>
wrote:
> Hi,
>
> So I start UML with the cmdline
>
> ./linux rootfstype=hostfs rw mem=1G init=/bin/bash
>
>
>
> When the bash shell comes up, I run my prog : ./my_prog
>
>
>
> 6173 pts/8 00:00:00 linux
>
> 6180 pts/8 00:00:00 linux
>
> 6181 pts/8 00:00:00 linux
>
> 6182 pts/8 00:00:00 linux
>
> 6183 pts/8 00:00:00 linux
>
> 6188 pts/8 00:00:13 linux
>
>
>
>
>
> The last item in the list with PID is 6188 is my program.
>
> I can tell because my_prog increments a counter in an infinite loop
>
> And consumes CPU cycles. It shows up on “top” as the dominant process.
>
>
>
> My question:
>
> 1. /proc/6188/exe is invalid. Why ??
>
> I mean, it doesn’t point to anything.
>
> Shouldn’t it point to my_prog or something ?
>
>
>
> 2. What do the 4 UML processes 6173, 6180, 6181, 6182 do ? (6183 is
> /bin/bash whos “exe” symlink is also doesn’t point to anything !!)
>
> 3. When a UML process, say my_prog (PID 6188) makes a system call,
> where is the system call executed – is it within the addr space of 6173
> (the UML kernel process) or 6188 (my_prog running in UML ??)
>
>
>
> -Sanketh
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Time is money. Stop wasting it! Get your web API in 5 minutes.
> www.restlet.com/download
> http://p.sf.net/sfu/restlet
> _______________________________________________
> User-mode-linux-user mailing list
> Use...@li...
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
>
>
|
|
From: Nalli, S. <san...@hp...> - 2014-06-02 17:56:27
|
Thanks a lot.
Do you know why my /proc is empty in the guest
And why does the /proc/PID/exe NOT point to anything in
The host ? (PID is the pid of a dummy program running in UML)
From: enjoy mindful [mailto:enj...@gm...]
Sent: Friday, May 30, 2014 12:06 AM
To: Nalli, Sanketh
Cc: use...@li...
Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes
let me answer your second question.
I did this analysis with kernel linux-3.12.6:
1) make ARCH=um cscope
2) search functions which called 'clone'
File Function Line
0 ubd_user.c start_io_thread 43 pid = clone(io_thread, (void *) sp, CLONE_FILES |
CLONE_VM, NULL);
1 helper.c start_io_thread 74 pid = clone(helper_child, (void *) sp, CLONE_VM, &data);
2 helper.c start_io_thread 124 pid = clone(proc, (void *) sp, flags, arg);
3 process.c start_userspace 300 pid = clone(userspace_tramp, (void *) sp, flags, (void *)
stub_stack);
4 lguest.c create_thread 1048 vq->thread = clone(do_thread, stack + 32768, CLONE_VM |
SIGCHLD, vq);
3) insert some printk statement in those function
4) build and run, then watch the booting process output
[root@localhost ~]# dmesg | grep 6436
[ 0.190000] run_helper_thread : clone success, pid = 6436
[root@localhost ~]# dmesg | grep 6437
[ 0.190000] start_io_thread - clone success : pid = 6437
[root@localhost ~]# dmesg | grep 6438
[ 0.190000] run_helper_thread : clone success, pid = 6438
[real@real runuml]$ ps -ef | grep patch
real 6423 1553 6 16:17 pts/0 00:00:02 ./linux_patched ubda=./Fedora20-x86-root_fs mem=256m
real 6436 6423 0 16:17 pts/0 00:00:00 ./linux_patched ubda=./Fedora20-x86-root_fs mem=256m
real 6437 6423 0 16:17 pts/0 00:00:00 ./linux_patched ubda=./Fedora20-x86-root_fs mem=256m
real 6438 6423 0 16:17 pts/0 00:00:00 ./linux_patched ubda=./Fedora20-x86-root_fs mem=256m
real 6439 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6459 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6479 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6492 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6565 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6567 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6572 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6573 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6576 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6605 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6619 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6621 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6707 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6715 6423 0 16:17 pts/0 00:00:00 [linux_patched]
real 6765 6423 0 16:18 pts/0 00:00:00 [linux_patched]
[root@localhost ~]# dmesg | grep proc
[ 0.090000] run_helper_thread : clone success, pid = 8387, proc=0806471d
[ 0.100000] run_helper_thread : clone success, pid = 8389, proc=080663a3
[real@real linux-3.12.6]$ grep 0806471d System.map
0806471d t aio_thread
[real@real linux-3.12.6]$ grep 080663a3 System.map
080663a3 t write_sigio_thread
so, the four processes are:
1) uml kernel main thread
2) aio_thread
3) io_thread
4) write_sigio_thread
On Fri, May 30, 2014 at 9:22 AM, Nalli, Sanketh <san...@hp...<mailto:san...@hp...>> wrote:
Hi,
So I start UML with the cmdline
./linux rootfstype=hostfs rw mem=1G init=/bin/bash
When the bash shell comes up, I run my prog : ./my_prog
6173 pts/8 00:00:00 linux
6180 pts/8 00:00:00 linux
6181 pts/8 00:00:00 linux
6182 pts/8 00:00:00 linux
6183 pts/8 00:00:00 linux
6188 pts/8 00:00:13 linux
The last item in the list with PID is 6188 is my program.
I can tell because my_prog increments a counter in an infinite loop
And consumes CPU cycles. It shows up on “top” as the dominant process.
My question:
1. /proc/6188/exe is invalid. Why ??
I mean, it doesn’t point to anything.
Shouldn’t it point to my_prog or something ?
2. What do the 4 UML processes 6173, 6180, 6181, 6182 do ? (6183 is /bin/bash whos “exe” symlink is also doesn’t point to anything !!)
3. When a UML process, say my_prog (PID 6188) makes a system call, where is the system call executed – is it within the addr space of 6173 (the UML kernel process) or 6188 (my_prog running in UML ??)
-Sanketh
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download<http://www.restlet.com/download>
http://p.sf.net/sfu/restlet
_______________________________________________
User-mode-linux-user mailing list
Use...@li...<mailto:Use...@li...>
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
|
|
From: Richard W. <ric...@gm...> - 2014-06-02 18:40:43
|
On Mon, Jun 2, 2014 at 7:55 PM, Nalli, Sanketh <san...@hp...> wrote: > Thanks a lot. > > Do you know why my /proc is empty in the guest Did you mount procfs? > And why does the /proc/PID/exe NOT point to anything in > > The host ? (PID is the pid of a dummy program running in UML) Host PID != Guest PID > > > From: enjoy mindful [mailto:enj...@gm...] > Sent: Friday, May 30, 2014 12:06 AM > To: Nalli, Sanketh > Cc: use...@li... > Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes > > > > let me answer your second question. > > I did this analysis with kernel linux-3.12.6: > > 1) make ARCH=um cscope > 2) search functions which called 'clone' > File Function Line > 0 ubd_user.c start_io_thread 43 pid = clone(io_thread, (void *) sp, > CLONE_FILES | > CLONE_VM, NULL); > 1 helper.c start_io_thread 74 pid = clone(helper_child, (void *) sp, > CLONE_VM, &data); > 2 helper.c start_io_thread 124 pid = clone(proc, (void *) sp, flags, > arg); > 3 process.c start_userspace 300 pid = clone(userspace_tramp, (void *) sp, > flags, (void *) > stub_stack); > 4 lguest.c create_thread 1048 vq->thread = clone(do_thread, stack + > 32768, CLONE_VM | > SIGCHLD, vq); > > 3) insert some printk statement in those function > 4) build and run, then watch the booting process output > [root@localhost ~]# dmesg | grep 6436 > [ 0.190000] run_helper_thread : clone success, pid = 6436 > [root@localhost ~]# dmesg | grep 6437 > [ 0.190000] start_io_thread - clone success : pid = 6437 > [root@localhost ~]# dmesg | grep 6438 > [ 0.190000] run_helper_thread : clone success, pid = 6438 > > [real@real runuml]$ ps -ef | grep patch > real 6423 1553 6 16:17 pts/0 00:00:02 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6436 6423 0 16:17 pts/0 00:00:00 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6437 6423 0 16:17 pts/0 00:00:00 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6438 6423 0 16:17 pts/0 00:00:00 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6439 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6459 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6479 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6492 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6565 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6567 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6572 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6573 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6576 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6605 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6619 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6621 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6707 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6715 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6765 6423 0 16:18 pts/0 00:00:00 [linux_patched] > > [root@localhost ~]# dmesg | grep proc > [ 0.090000] run_helper_thread : clone success, pid = 8387, proc=0806471d > [ 0.100000] run_helper_thread : clone success, pid = 8389, proc=080663a3 > > [real@real linux-3.12.6]$ grep 0806471d System.map > 0806471d t aio_thread > [real@real linux-3.12.6]$ grep 080663a3 System.map > 080663a3 t write_sigio_thread > > so, the four processes are: > 1) uml kernel main thread > 2) aio_thread > 3) io_thread > 4) write_sigio_thread > > > > On Fri, May 30, 2014 at 9:22 AM, Nalli, Sanketh <san...@hp...> > wrote: > > Hi, > > So I start UML with the cmdline > > ./linux rootfstype=hostfs rw mem=1G init=/bin/bash > > > > When the bash shell comes up, I run my prog : ./my_prog > > > > 6173 pts/8 00:00:00 linux > > 6180 pts/8 00:00:00 linux > > 6181 pts/8 00:00:00 linux > > 6182 pts/8 00:00:00 linux > > 6183 pts/8 00:00:00 linux > > 6188 pts/8 00:00:13 linux > > > > > > The last item in the list with PID is 6188 is my program. > > I can tell because my_prog increments a counter in an infinite loop > > And consumes CPU cycles. It shows up on “top” as the dominant process. > > > > My question: > > 1. /proc/6188/exe is invalid. Why ?? > > I mean, it doesn’t point to anything. > > Shouldn’t it point to my_prog or something ? > > > > 2. What do the 4 UML processes 6173, 6180, 6181, 6182 do ? (6183 is > /bin/bash whos “exe” symlink is also doesn’t point to anything !!) > > 3. When a UML process, say my_prog (PID 6188) makes a system call, > where is the system call executed – is it within the addr space of 6173 (the > UML kernel process) or 6188 (my_prog running in UML ??) > > > > -Sanketh > > > > > > > ------------------------------------------------------------------------------ > Time is money. Stop wasting it! Get your web API in 5 minutes. > www.restlet.com/download > http://p.sf.net/sfu/restlet > _______________________________________________ > User-mode-linux-user mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user > > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > User-mode-linux-user mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user > -- Thanks, //richard |
|
From: Nalli, S. <san...@hp...> - 2014-06-02 18:54:08
|
>>And why does the /proc/PID/exe NOT point to anything in >> >> The host ? (PID is the pid of a dummy program running in UML) >Host PID != Guest PID Yes I know that. That’s not what I meant. What I am trying to say is this : 1. When you run a program in side UML it shows up on HOST as "linux" in the ps -e listing 2. the "exe" symlink of that "linux" process in the /proc of the HOST Is EMPTY !!! -----Original Message----- From: Richard Weinberger [mailto:ric...@gm...] Sent: Monday, June 02, 2014 11:41 AM To: Nalli, Sanketh Cc: enjoy mindful; use...@li... Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes On Mon, Jun 2, 2014 at 7:55 PM, Nalli, Sanketh <san...@hp...> wrote: > Thanks a lot. > > Do you know why my /proc is empty in the guest Did you mount procfs? > > > From: enjoy mindful [mailto:enj...@gm...] > Sent: Friday, May 30, 2014 12:06 AM > To: Nalli, Sanketh > Cc: use...@li... > Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes > > > > let me answer your second question. > > I did this analysis with kernel linux-3.12.6: > > 1) make ARCH=um cscope > 2) search functions which called 'clone' > File Function Line > 0 ubd_user.c start_io_thread 43 pid = clone(io_thread, (void *) sp, > CLONE_FILES | > CLONE_VM, NULL); > 1 helper.c start_io_thread 74 pid = clone(helper_child, (void *) sp, > CLONE_VM, &data); > 2 helper.c start_io_thread 124 pid = clone(proc, (void *) sp, flags, > arg); > 3 process.c start_userspace 300 pid = clone(userspace_tramp, (void > *) sp, flags, (void *) > stub_stack); > 4 lguest.c create_thread 1048 vq->thread = clone(do_thread, stack + > 32768, CLONE_VM | > SIGCHLD, vq); > > 3) insert some printk statement in those function > 4) build and run, then watch the booting process output > [root@localhost ~]# dmesg | grep 6436 > [ 0.190000] run_helper_thread : clone success, pid = 6436 > [root@localhost ~]# dmesg | grep 6437 > [ 0.190000] start_io_thread - clone success : pid = 6437 > [root@localhost ~]# dmesg | grep 6438 > [ 0.190000] run_helper_thread : clone success, pid = 6438 > > [real@real runuml]$ ps -ef | grep patch > real 6423 1553 6 16:17 pts/0 00:00:02 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6436 6423 0 16:17 pts/0 00:00:00 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6437 6423 0 16:17 pts/0 00:00:00 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6438 6423 0 16:17 pts/0 00:00:00 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6439 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6459 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6479 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6492 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6565 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6567 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6572 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6573 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6576 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6605 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6619 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6621 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6707 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6715 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6765 6423 0 16:18 pts/0 00:00:00 [linux_patched] > > [root@localhost ~]# dmesg | grep proc > [ 0.090000] run_helper_thread : clone success, pid = 8387, proc=0806471d > [ 0.100000] run_helper_thread : clone success, pid = 8389, proc=080663a3 > > [real@real linux-3.12.6]$ grep 0806471d System.map 0806471d t > aio_thread [real@real linux-3.12.6]$ grep 080663a3 System.map > 080663a3 t write_sigio_thread > > so, the four processes are: > 1) uml kernel main thread > 2) aio_thread > 3) io_thread > 4) write_sigio_thread > > > > On Fri, May 30, 2014 at 9:22 AM, Nalli, Sanketh <san...@hp...> > wrote: > > Hi, > > So I start UML with the cmdline > > ./linux rootfstype=hostfs rw mem=1G init=/bin/bash > > > > When the bash shell comes up, I run my prog : ./my_prog > > > > 6173 pts/8 00:00:00 linux > > 6180 pts/8 00:00:00 linux > > 6181 pts/8 00:00:00 linux > > 6182 pts/8 00:00:00 linux > > 6183 pts/8 00:00:00 linux > > 6188 pts/8 00:00:13 linux > > > > > > The last item in the list with PID is 6188 is my program. > > I can tell because my_prog increments a counter in an infinite loop > > And consumes CPU cycles. It shows up on “top” as the dominant process. > > > > My question: > > 1. /proc/6188/exe is invalid. Why ?? > > I mean, it doesn’t point to anything. > > Shouldn’t it point to my_prog or something ? > > > > 2. What do the 4 UML processes 6173, 6180, 6181, 6182 do ? (6183 is > /bin/bash whos “exe” symlink is also doesn’t point to anything !!) > > 3. When a UML process, say my_prog (PID 6188) makes a system call, > where is the system call executed – is it within the addr space of > 6173 (the UML kernel process) or 6188 (my_prog running in UML ??) > > > > -Sanketh > > > > > > > ---------------------------------------------------------------------- > -------- Time is money. Stop wasting it! Get your web API in 5 > minutes. > www.restlet.com/download > http://p.sf.net/sfu/restlet > _______________________________________________ > User-mode-linux-user mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user > > > > > ---------------------------------------------------------------------- > -------- Learn Graph Databases - Download FREE O'Reilly Book "Graph > Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, this > first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > User-mode-linux-user mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user > -- Thanks, //richard |
|
From: Richard W. <ri...@no...> - 2014-06-02 19:06:22
|
Am 02.06.2014 20:53, schrieb Nalli, Sanketh: >>> And why does the /proc/PID/exe NOT point to anything in >>> >>> The host ? (PID is the pid of a dummy program running in UML) > >> Host PID != Guest PID > > Yes I know that. > That’s not what I meant. > > What I am trying to say is this : > 1. When you run a program in side UML it shows up on HOST > as "linux" in the ps -e listing > > 2. the "exe" symlink of that "linux" process in the /proc of the HOST > Is EMPTY !!! Not here: rw@sandpuppy:~> for i in `pidof linux` ; do ls -l /proc/$i/exe ; done lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31270/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31269/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31266/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31250/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31248/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31245/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31244/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31243/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31237/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30784/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30783/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30759/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30686/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30685/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30684/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30683/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30676/exe -> /home/rw/linux/linux What host kernel are you using? Thanks, //richard |
|
From: Nalli, S. <san...@hp...> - 2014-06-02 19:10:42
|
The host kernel is linux 3.5 And for guest I've tried Linux 3.9, 3.4 and 3.5. The distro is RHEL6 and Ubuntu 12.04 -----Original Message----- From: Richard Weinberger [mailto:ri...@no...] Sent: Monday, June 02, 2014 12:06 PM To: Nalli, Sanketh Cc: enjoy mindful; use...@li... Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes Am 02.06.2014 20:53, schrieb Nalli, Sanketh: >>> And why does the /proc/PID/exe NOT point to anything in >>> >>> The host ? (PID is the pid of a dummy program running in UML) > >> Host PID != Guest PID > > Yes I know that. > That’s not what I meant. > > What I am trying to say is this : > 1. When you run a program in side UML it shows up on HOST as "linux" > in the ps -e listing > > 2. the "exe" symlink of that "linux" process in the /proc of the HOST > Is EMPTY !!! Not here: rw@sandpuppy:~> for i in `pidof linux` ; do ls -l /proc/$i/exe ; done lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31270/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31269/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31266/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31250/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31248/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31245/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31244/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31243/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31237/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30784/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30783/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30759/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30686/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30685/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30684/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30683/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30676/exe -> /home/rw/linux/linux What host kernel are you using? Thanks, //richard |
|
From: Nalli, S. <san...@hp...> - 2014-06-02 19:17:25
|
nalli@haris-crashnburn:~$ cd /proc/6188 nalli@haris-crashnburn:/proc/6188$ ls -l exe ls: cannot read symbolic link exe: No such file or directory lrwxrwxrwx 1 nalli nalli 0 May 30 07:45 exe nalli@haris-crashnburn:/proc/6188$ killall linux -----Original Message----- From: Nalli, Sanketh Sent: Monday, June 02, 2014 12:12 PM To: Richard Weinberger Cc: use...@li... Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes Also, This is how I compile and run : make defconfig ARCH=um make menuconfig ARCH=um ( set the CONFIG_X86_64 = y) make -j 24 ARCH=um ./linux rootfstype=hostfs rw mem=1G init=/bin/bash -----Original Message----- From: Richard Weinberger [mailto:ri...@no...] Sent: Monday, June 02, 2014 12:06 PM To: Nalli, Sanketh Cc: enjoy mindful; use...@li... Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes Am 02.06.2014 20:53, schrieb Nalli, Sanketh: >>> And why does the /proc/PID/exe NOT point to anything in >>> >>> The host ? (PID is the pid of a dummy program running in UML) > >> Host PID != Guest PID > > Yes I know that. > That’s not what I meant. > > What I am trying to say is this : > 1. When you run a program in side UML it shows up on HOST as "linux" > in the ps -e listing > > 2. the "exe" symlink of that "linux" process in the /proc of the HOST > Is EMPTY !!! Not here: rw@sandpuppy:~> for i in `pidof linux` ; do ls -l /proc/$i/exe ; done lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31270/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31269/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31266/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31250/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31248/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31245/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31244/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31243/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31237/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30784/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30783/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30759/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30686/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30685/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30684/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30683/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30676/exe -> /home/rw/linux/linux What host kernel are you using? Thanks, //richard ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ User-mode-linux-user mailing list Use...@li... https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user |
|
From: Nalli, S. <san...@hp...> - 2014-06-02 20:12:52
|
Nothing..just lists all the contents including the hidden Ones in a long listing fashion. -----Original Message----- From: Richard Weinberger [mailto:ri...@no...] Sent: Monday, June 02, 2014 12:20 PM To: Nalli, Sanketh Cc: use...@li... Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes Am 02.06.2014 21:16, schrieb Nalli, Sanketh: > nalli@haris-crashnburn:~$ cd /proc/6188 > nalli@haris-crashnburn:/proc/6188$ ls -l exe What does "ls -la /proc/6188" show? Thanks, //richard |
|
From: Nalli, S. <san...@hp...> - 2014-06-02 20:17:00
|
-r--r--r-- 1 nalli nalli 0 Jun 2 13:07 wchan nalli@haris-crashnburn:/proc/4755$ ls -la ls: cannot read symbolic link exe: No such file or directory total 0 dr-xr-xr-x 9 nalli nalli 0 Jun 2 13:07 . dr-xr-xr-x 346 root root 0 May 23 10:18 .. dr-xr-xr-x 2 nalli nalli 0 Jun 2 13:07 attr -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 autogroup -r-------- 1 nalli nalli 0 Jun 2 13:07 auxv -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 cgroup --w------- 1 nalli nalli 0 Jun 2 13:07 clear_refs -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 cmdline -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 comm -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 coredump_filter -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 cpuset lrwxrwxrwx 1 nalli nalli 0 Jun 2 13:07 cwd -> /home/nalli/cache_cow/linux-3.5 -r-------- 1 nalli nalli 0 Jun 2 13:07 environ lrwxrwxrwx 1 nalli nalli 0 Jun 2 13:07 exe dr-x------ 2 nalli nalli 0 Jun 2 13:07 fd dr-x------ 2 nalli nalli 0 Jun 2 13:07 fdinfo -r-------- 1 nalli nalli 0 Jun 2 13:07 io -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 latency -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 limits -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 loginuid dr-x------ 2 nalli nalli 0 Jun 2 13:07 map_files -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 maps -rw------- 1 nalli nalli 0 Jun 2 13:07 mem -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 mountinfo -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 mounts -r-------- 1 nalli nalli 0 Jun 2 13:07 mountstats dr-xr-xr-x 5 nalli nalli 0 Jun 2 13:07 net dr-x--x--x 2 nalli nalli 0 Jun 2 13:07 ns -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 numa_maps -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 oom_adj -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 oom_score -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 oom_score_adj -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 pagemap -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 personality lrwxrwxrwx 1 nalli nalli 0 Jun 2 13:07 root -> / -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 sched -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 schedstat -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 sessionid -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 smaps -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 stack -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 stat -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 statm -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 status -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 syscall dr-xr-xr-x 3 nalli nalli 0 Jun 2 13:07 task -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 wchan nalli@haris-crashnburn:/proc/4755$ killall linux nalli@haris-crashnburn:/proc/4755$ -----Original Message----- From: Richard Weinberger [mailto:ri...@no...] Sent: Monday, June 02, 2014 1:15 PM To: Nalli, Sanketh Cc: use...@li... Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes Am 02.06.2014 22:11, schrieb Nalli, Sanketh: > Nothing..just lists all the contents including the hidden Ones in a > long listing fashion. Please show it verbatim. Thanks, //richard > -----Original Message----- > From: Richard Weinberger [mailto:ri...@no...] > Sent: Monday, June 02, 2014 12:20 PM > To: Nalli, Sanketh > Cc: use...@li... > Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes > > > > Am 02.06.2014 21:16, schrieb Nalli, Sanketh: >> nalli@haris-crashnburn:~$ cd /proc/6188 >> nalli@haris-crashnburn:/proc/6188$ ls -l exe > > What does "ls -la /proc/6188" show? > > Thanks, > //richard > |
|
From: Nalli, S. <san...@hp...> - 2014-06-02 20:43:40
|
Nope, but here is some bootlog
The host does not have skas3 patch
Do you think that is the problem ?
Which host shd I use that already has this patch
(I mean I cud patch the host myself but if there is one
Already present, that is good !)
Core dump limits :
soft - 0
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking for tmpfs mount on /dev/shm...nothing mounted on /dev/shm
Checking PROT_EXEC mmap in /tmp/...OK
Checking for new_mm and switch_mm support in the host:
/proc/self/mm ... Failed -
No such file or directory
Checking for the skas3 patch in the host:
- /proc/mm...not found: No such file or directory
- PTRACE_FAULTINFO...not found
- PTRACE_LDT...not found
UML running in SKAS0 mode
Adding 20606976 bytes to physical memory to account for exec-shield gap
Linux version 2.6.24-g91525300-dirty (jd...@am...) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)) #1 Mon Jan 28 12:03:41 EST 2008
-----Original Message-----
From: Richard Weinberger [mailto:ri...@no...]
Sent: Monday, June 02, 2014 1:41 PM
To: Nalli, Sanketh
Cc: use...@li...
Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes
Are you running UML under a debugger?
Thanks,
//richard
Am 02.06.2014 22:16, schrieb Nalli, Sanketh:
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 wchan
> nalli@haris-crashnburn:/proc/4755$ ls -la
> ls: cannot read symbolic link exe: No such file or directory total 0
> dr-xr-xr-x 9 nalli nalli 0 Jun 2 13:07 .
> dr-xr-xr-x 346 root root 0 May 23 10:18 ..
> dr-xr-xr-x 2 nalli nalli 0 Jun 2 13:07 attr
> -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 autogroup
> -r-------- 1 nalli nalli 0 Jun 2 13:07 auxv
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 cgroup
> --w------- 1 nalli nalli 0 Jun 2 13:07 clear_refs
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 cmdline
> -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 comm
> -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 coredump_filter
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 cpuset
> lrwxrwxrwx 1 nalli nalli 0 Jun 2 13:07 cwd -> /home/nalli/cache_cow/linux-3.5
> -r-------- 1 nalli nalli 0 Jun 2 13:07 environ
> lrwxrwxrwx 1 nalli nalli 0 Jun 2 13:07 exe
> dr-x------ 2 nalli nalli 0 Jun 2 13:07 fd
> dr-x------ 2 nalli nalli 0 Jun 2 13:07 fdinfo
> -r-------- 1 nalli nalli 0 Jun 2 13:07 io
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 latency
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 limits
> -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 loginuid
> dr-x------ 2 nalli nalli 0 Jun 2 13:07 map_files
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 maps
> -rw------- 1 nalli nalli 0 Jun 2 13:07 mem
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 mountinfo
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 mounts
> -r-------- 1 nalli nalli 0 Jun 2 13:07 mountstats
> dr-xr-xr-x 5 nalli nalli 0 Jun 2 13:07 net
> dr-x--x--x 2 nalli nalli 0 Jun 2 13:07 ns
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 numa_maps
> -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 oom_adj
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 oom_score
> -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 oom_score_adj
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 pagemap
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 personality
> lrwxrwxrwx 1 nalli nalli 0 Jun 2 13:07 root -> /
> -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 sched
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 schedstat
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 sessionid
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 smaps
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 stack
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 stat
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 statm
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 status
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 syscall
> dr-xr-xr-x 3 nalli nalli 0 Jun 2 13:07 task
> -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 wchan
> nalli@haris-crashnburn:/proc/4755$ killall linux
> nalli@haris-crashnburn:/proc/4755$
>
> -----Original Message-----
> From: Richard Weinberger [mailto:ri...@no...]
> Sent: Monday, June 02, 2014 1:15 PM
> To: Nalli, Sanketh
> Cc: use...@li...
> Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes
>
> Am 02.06.2014 22:11, schrieb Nalli, Sanketh:
>> Nothing..just lists all the contents including the hidden Ones in a
>> long listing fashion.
>
> Please show it verbatim.
>
> Thanks,
> //richard
>
>> -----Original Message-----
>> From: Richard Weinberger [mailto:ri...@no...]
>> Sent: Monday, June 02, 2014 12:20 PM
>> To: Nalli, Sanketh
>> Cc: use...@li...
>> Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes
>>
>>
>>
>> Am 02.06.2014 21:16, schrieb Nalli, Sanketh:
>>> nalli@haris-crashnburn:~$ cd /proc/6188
>>> nalli@haris-crashnburn:/proc/6188$ ls -l exe
>>
>> What does "ls -la /proc/6188" show?
>>
>> Thanks,
>> //richard
>>
|
|
From: Nalli, S. <san...@hp...> - 2014-06-03 01:30:58
|
I mean, there is only ONE thread in UML that intercepts The system calls and services them. Can we have more such threads in the kernel ? -----Original Message----- From: Nalli, Sanketh Sent: Monday, June 02, 2014 6:29 PM To: use...@li...; 'Richard Weinberger' Cc: Volos, Haris Subject: RE: [uml-user] invalid /proc/PID/exe in UML processes Okay, so I've found a way around the invalid exe symlink. I don't need that anymore. The next challenge is concurrency in UML. I wrote a simple program that launches 10 pthreads, Each of which makes some system calls in an infinite loop. I notice that even though there are 10 threads in my dummy program, There is only ONE UML kernel thread. Is this correct ? If so, does this mean that UML kernel is serializing the execution ? Is there some way of making UML kernel multi-threaded ? -----Original Message----- From: Richard Weinberger [mailto:ri...@no...] Sent: Monday, June 02, 2014 1:46 PM To: Nalli, Sanketh Cc: use...@li... Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes Am 02.06.2014 22:42, schrieb Nalli, Sanketh: > Nope, but here is some bootlog Hmm, I have no idea so far. Applications running under valgrind or other debuggers suffered from the issue that /proc/pid/exe is empty. > The host does not have skas3 patch > Do you think that is the problem ? Nope. SKAS0 works fine. > Which host shd I use that already has this patch (I mean I cud patch > the host myself but if there is one Already present, that is good !) > > Core dump limits : > soft - 0 > hard - NONE > Checking that ptrace can change system call numbers...OK Checking > syscall emulation patch for ptrace...OK Checking advanced syscall > emulation patch for ptrace...OK Checking for tmpfs mount on > /dev/shm...nothing mounted on /dev/shm Checking PROT_EXEC mmap in > /tmp/...OK Checking for new_mm and switch_mm support in the host: > /proc/self/mm ... Failed - > No such file or directory > Checking for the skas3 patch in the host: > - /proc/mm...not found: No such file or directory > - PTRACE_FAULTINFO...not found > - PTRACE_LDT...not found > UML running in SKAS0 mode > Adding 20606976 bytes to physical memory to account for exec-shield > gap Linux version 2.6.24-g91525300-dirty > (jd...@am...) (gcc version 4.1.1 20070105 (Red Hat > 4.1.1-51)) #1 Mon Jan 28 12:03:41 EST 2008 Wow. This UML is horrible old. Thanks, //richard |
|
From: Richard W. <ri...@no...> - 2014-06-03 07:20:14
|
Am 03.06.2014 03:29, schrieb Nalli, Sanketh: > I mean, there is only ONE thread in UML that intercepts > The system calls and services them. > Can we have more such threads in the kernel ? UML has no SMP support. Thanks, //richard > -----Original Message----- > From: Nalli, Sanketh > Sent: Monday, June 02, 2014 6:29 PM > To: use...@li...; 'Richard Weinberger' > Cc: Volos, Haris > Subject: RE: [uml-user] invalid /proc/PID/exe in UML processes > > Okay, so I've found a way around the invalid exe symlink. > I don't need that anymore. > The next challenge is concurrency in UML. > > I wrote a simple program that launches 10 pthreads, Each of which makes some system calls in an infinite loop. > > I notice that even though there are 10 threads in my dummy program, There is only ONE UML kernel thread. Is this correct ? > If so, does this mean that UML kernel is serializing the execution ? > Is there some way of making UML kernel multi-threaded ? > > -----Original Message----- > From: Richard Weinberger [mailto:ri...@no...] > Sent: Monday, June 02, 2014 1:46 PM > To: Nalli, Sanketh > Cc: use...@li... > Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes > > Am 02.06.2014 22:42, schrieb Nalli, Sanketh: >> Nope, but here is some bootlog > > Hmm, I have no idea so far. > > Applications running under valgrind or other debuggers suffered from the issue that /proc/pid/exe is empty. > >> The host does not have skas3 patch >> Do you think that is the problem ? > > Nope. SKAS0 works fine. > >> Which host shd I use that already has this patch (I mean I cud patch >> the host myself but if there is one Already present, that is good !) >> >> Core dump limits : >> soft - 0 >> hard - NONE >> Checking that ptrace can change system call numbers...OK Checking >> syscall emulation patch for ptrace...OK Checking advanced syscall >> emulation patch for ptrace...OK Checking for tmpfs mount on >> /dev/shm...nothing mounted on /dev/shm Checking PROT_EXEC mmap in >> /tmp/...OK Checking for new_mm and switch_mm support in the host: >> /proc/self/mm ... Failed - >> No such file or directory >> Checking for the skas3 patch in the host: >> - /proc/mm...not found: No such file or directory >> - PTRACE_FAULTINFO...not found >> - PTRACE_LDT...not found >> UML running in SKAS0 mode >> Adding 20606976 bytes to physical memory to account for exec-shield >> gap Linux version 2.6.24-g91525300-dirty >> (jd...@am...) (gcc version 4.1.1 20070105 (Red Hat >> 4.1.1-51)) #1 Mon Jan 28 12:03:41 EST 2008 > > Wow. This UML is horrible old. > > Thanks, > //richard > |
|
From: Richard W. <ric...@gm...> - 2014-05-30 07:38:01
|
On Fri, May 30, 2014 at 3:22 AM, Nalli, Sanketh <san...@hp...> wrote: > Hi, > > So I start UML with the cmdline > > ./linux rootfstype=hostfs rw mem=1G init=/bin/bash > > > > When the bash shell comes up, I run my prog : ./my_prog > > > > 6173 pts/8 00:00:00 linux > > 6180 pts/8 00:00:00 linux > > 6181 pts/8 00:00:00 linux > > 6182 pts/8 00:00:00 linux > > 6183 pts/8 00:00:00 linux > > 6188 pts/8 00:00:13 linux > > > > > > The last item in the list with PID is 6188 is my program. > > I can tell because my_prog increments a counter in an infinite loop > > And consumes CPU cycles. It shows up on “top” as the dominant process. > > > > My question: > > 1. /proc/6188/exe is invalid. Why ?? > > I mean, it doesn’t point to anything. This cannot be. On the host side it will point to the UML binary itself and on the guest side to the executed program image. > Shouldn’t it point to my_prog or something ? > > > > 2. What do the 4 UML processes 6173, 6180, 6181, 6182 do ? (6183 is > /bin/bash whos “exe” symlink is also doesn’t point to anything !!) See enj...@gm...'s answer. > 3. When a UML process, say my_prog (PID 6188) makes a system call, > where is the system call executed – is it within the addr space of 6173 (the > UML kernel process) or 6188 (my_prog running in UML ??) Within the kernel Process. See arch/um/kernel/skas/syscall.c -- Thanks, //richard |
|
From: Nalli, S. <san...@hp...> - 2014-06-02 18:54:48
|
And that symlink is crucial to the workload I am trying to run !!!!! -----Original Message----- From: Nalli, Sanketh Sent: Monday, June 02, 2014 11:53 AM To: 'Richard Weinberger' Cc: enjoy mindful; use...@li... Subject: RE: [uml-user] invalid /proc/PID/exe in UML processes >>And why does the /proc/PID/exe NOT point to anything in >> >> The host ? (PID is the pid of a dummy program running in UML) >Host PID != Guest PID Yes I know that. That’s not what I meant. What I am trying to say is this : 1. When you run a program in side UML it shows up on HOST as "linux" in the ps -e listing 2. the "exe" symlink of that "linux" process in the /proc of the HOST Is EMPTY !!! -----Original Message----- From: Richard Weinberger [mailto:ric...@gm...] Sent: Monday, June 02, 2014 11:41 AM To: Nalli, Sanketh Cc: enjoy mindful; use...@li... Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes On Mon, Jun 2, 2014 at 7:55 PM, Nalli, Sanketh <san...@hp...> wrote: > Thanks a lot. > > Do you know why my /proc is empty in the guest Did you mount procfs? > > > From: enjoy mindful [mailto:enj...@gm...] > Sent: Friday, May 30, 2014 12:06 AM > To: Nalli, Sanketh > Cc: use...@li... > Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes > > > > let me answer your second question. > > I did this analysis with kernel linux-3.12.6: > > 1) make ARCH=um cscope > 2) search functions which called 'clone' > File Function Line > 0 ubd_user.c start_io_thread 43 pid = clone(io_thread, (void *) sp, > CLONE_FILES | > CLONE_VM, NULL); > 1 helper.c start_io_thread 74 pid = clone(helper_child, (void *) sp, > CLONE_VM, &data); > 2 helper.c start_io_thread 124 pid = clone(proc, (void *) sp, flags, > arg); > 3 process.c start_userspace 300 pid = clone(userspace_tramp, (void > *) sp, flags, (void *) > stub_stack); > 4 lguest.c create_thread 1048 vq->thread = clone(do_thread, stack + > 32768, CLONE_VM | > SIGCHLD, vq); > > 3) insert some printk statement in those function > 4) build and run, then watch the booting process output > [root@localhost ~]# dmesg | grep 6436 > [ 0.190000] run_helper_thread : clone success, pid = 6436 > [root@localhost ~]# dmesg | grep 6437 > [ 0.190000] start_io_thread - clone success : pid = 6437 > [root@localhost ~]# dmesg | grep 6438 > [ 0.190000] run_helper_thread : clone success, pid = 6438 > > [real@real runuml]$ ps -ef | grep patch > real 6423 1553 6 16:17 pts/0 00:00:02 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6436 6423 0 16:17 pts/0 00:00:00 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6437 6423 0 16:17 pts/0 00:00:00 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6438 6423 0 16:17 pts/0 00:00:00 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6439 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6459 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6479 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6492 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6565 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6567 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6572 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6573 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6576 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6605 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6619 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6621 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6707 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6715 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6765 6423 0 16:18 pts/0 00:00:00 [linux_patched] > > [root@localhost ~]# dmesg | grep proc > [ 0.090000] run_helper_thread : clone success, pid = 8387, proc=0806471d > [ 0.100000] run_helper_thread : clone success, pid = 8389, proc=080663a3 > > [real@real linux-3.12.6]$ grep 0806471d System.map 0806471d t > aio_thread [real@real linux-3.12.6]$ grep 080663a3 System.map > 080663a3 t write_sigio_thread > > so, the four processes are: > 1) uml kernel main thread > 2) aio_thread > 3) io_thread > 4) write_sigio_thread > > > > On Fri, May 30, 2014 at 9:22 AM, Nalli, Sanketh <san...@hp...> > wrote: > > Hi, > > So I start UML with the cmdline > > ./linux rootfstype=hostfs rw mem=1G init=/bin/bash > > > > When the bash shell comes up, I run my prog : ./my_prog > > > > 6173 pts/8 00:00:00 linux > > 6180 pts/8 00:00:00 linux > > 6181 pts/8 00:00:00 linux > > 6182 pts/8 00:00:00 linux > > 6183 pts/8 00:00:00 linux > > 6188 pts/8 00:00:13 linux > > > > > > The last item in the list with PID is 6188 is my program. > > I can tell because my_prog increments a counter in an infinite loop > > And consumes CPU cycles. It shows up on “top” as the dominant process. > > > > My question: > > 1. /proc/6188/exe is invalid. Why ?? > > I mean, it doesn’t point to anything. > > Shouldn’t it point to my_prog or something ? > > > > 2. What do the 4 UML processes 6173, 6180, 6181, 6182 do ? (6183 is > /bin/bash whos “exe” symlink is also doesn’t point to anything !!) > > 3. When a UML process, say my_prog (PID 6188) makes a system call, > where is the system call executed – is it within the addr space of > 6173 (the UML kernel process) or 6188 (my_prog running in UML ??) > > > > -Sanketh > > > > > > > ---------------------------------------------------------------------- > -------- Time is money. Stop wasting it! Get your web API in 5 > minutes. > www.restlet.com/download > http://p.sf.net/sfu/restlet > _______________________________________________ > User-mode-linux-user mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user > > > > > ---------------------------------------------------------------------- > -------- Learn Graph Databases - Download FREE O'Reilly Book "Graph > Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, this > first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > User-mode-linux-user mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user > -- Thanks, //richard |
|
From: Nalli, S. <san...@hp...> - 2014-06-02 19:08:24
|
-----Original Message----- From: Nalli, Sanketh Sent: Monday, June 02, 2014 11:54 AM To: Richard Weinberger Cc: use...@li... Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes And that symlink is crucial to the workload I am trying to run !!!!! -----Original Message----- From: Nalli, Sanketh Sent: Monday, June 02, 2014 11:53 AM To: 'Richard Weinberger' Cc: enjoy mindful; use...@li... Subject: RE: [uml-user] invalid /proc/PID/exe in UML processes >>And why does the /proc/PID/exe NOT point to anything in >> >> The host ? (PID is the pid of a dummy program running in UML) >Host PID != Guest PID Yes I know that. That’s not what I meant. What I am trying to say is this : 1. When you run a program in side UML it shows up on HOST as "linux" in the ps -e listing 2. the "exe" symlink of that "linux" process in the /proc of the HOST Is EMPTY !!! -----Original Message----- From: Richard Weinberger [mailto:ric...@gm...] Sent: Monday, June 02, 2014 11:41 AM To: Nalli, Sanketh Cc: enjoy mindful; use...@li... Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes On Mon, Jun 2, 2014 at 7:55 PM, Nalli, Sanketh <san...@hp...> wrote: > Thanks a lot. > > Do you know why my /proc is empty in the guest Did you mount procfs? > > > From: enjoy mindful [mailto:enj...@gm...] > Sent: Friday, May 30, 2014 12:06 AM > To: Nalli, Sanketh > Cc: use...@li... > Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes > > > > let me answer your second question. > > I did this analysis with kernel linux-3.12.6: > > 1) make ARCH=um cscope > 2) search functions which called 'clone' > File Function Line > 0 ubd_user.c start_io_thread 43 pid = clone(io_thread, (void *) sp, > CLONE_FILES | > CLONE_VM, NULL); > 1 helper.c start_io_thread 74 pid = clone(helper_child, (void *) sp, > CLONE_VM, &data); > 2 helper.c start_io_thread 124 pid = clone(proc, (void *) sp, flags, > arg); > 3 process.c start_userspace 300 pid = clone(userspace_tramp, (void > *) sp, flags, (void *) > stub_stack); > 4 lguest.c create_thread 1048 vq->thread = clone(do_thread, stack + > 32768, CLONE_VM | > SIGCHLD, vq); > > 3) insert some printk statement in those function > 4) build and run, then watch the booting process output > [root@localhost ~]# dmesg | grep 6436 > [ 0.190000] run_helper_thread : clone success, pid = 6436 > [root@localhost ~]# dmesg | grep 6437 > [ 0.190000] start_io_thread - clone success : pid = 6437 > [root@localhost ~]# dmesg | grep 6438 > [ 0.190000] run_helper_thread : clone success, pid = 6438 > > [real@real runuml]$ ps -ef | grep patch > real 6423 1553 6 16:17 pts/0 00:00:02 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6436 6423 0 16:17 pts/0 00:00:00 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6437 6423 0 16:17 pts/0 00:00:00 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6438 6423 0 16:17 pts/0 00:00:00 ./linux_patched > ubda=./Fedora20-x86-root_fs mem=256m > real 6439 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6459 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6479 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6492 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6565 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6567 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6572 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6573 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6576 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6605 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6619 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6621 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6707 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6715 6423 0 16:17 pts/0 00:00:00 [linux_patched] > real 6765 6423 0 16:18 pts/0 00:00:00 [linux_patched] > > [root@localhost ~]# dmesg | grep proc > [ 0.090000] run_helper_thread : clone success, pid = 8387, proc=0806471d > [ 0.100000] run_helper_thread : clone success, pid = 8389, proc=080663a3 > > [real@real linux-3.12.6]$ grep 0806471d System.map 0806471d t > aio_thread [real@real linux-3.12.6]$ grep 080663a3 System.map > 080663a3 t write_sigio_thread > > so, the four processes are: > 1) uml kernel main thread > 2) aio_thread > 3) io_thread > 4) write_sigio_thread > > > > On Fri, May 30, 2014 at 9:22 AM, Nalli, Sanketh <san...@hp...> > wrote: > > Hi, > > So I start UML with the cmdline > > ./linux rootfstype=hostfs rw mem=1G init=/bin/bash > > > > When the bash shell comes up, I run my prog : ./my_prog > > > > 6173 pts/8 00:00:00 linux > > 6180 pts/8 00:00:00 linux > > 6181 pts/8 00:00:00 linux > > 6182 pts/8 00:00:00 linux > > 6183 pts/8 00:00:00 linux > > 6188 pts/8 00:00:13 linux > > > > > > The last item in the list with PID is 6188 is my program. > > I can tell because my_prog increments a counter in an infinite loop > > And consumes CPU cycles. It shows up on “top” as the dominant process. > > > > My question: > > 1. /proc/6188/exe is invalid. Why ?? > > I mean, it doesn’t point to anything. > > Shouldn’t it point to my_prog or something ? > > > > 2. What do the 4 UML processes 6173, 6180, 6181, 6182 do ? (6183 is > /bin/bash whos “exe” symlink is also doesn’t point to anything !!) > > 3. When a UML process, say my_prog (PID 6188) makes a system call, > where is the system call executed – is it within the addr space of > 6173 (the UML kernel process) or 6188 (my_prog running in UML ??) > > > > -Sanketh > > > > > > > ---------------------------------------------------------------------- > -------- Time is money. Stop wasting it! Get your web API in 5 > minutes. > www.restlet.com/download > http://p.sf.net/sfu/restlet > _______________________________________________ > User-mode-linux-user mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user > > > > > ---------------------------------------------------------------------- > -------- Learn Graph Databases - Download FREE O'Reilly Book "Graph > Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, this > first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > User-mode-linux-user mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user > -- Thanks, //richard ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ User-mode-linux-user mailing list Use...@li... https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user |
|
From: Nalli, S. <san...@hp...> - 2014-06-02 19:12:36
|
Also, This is how I compile and run : make defconfig ARCH=um make menuconfig ARCH=um ( set the CONFIG_X86_64 = y) make -j 24 ARCH=um ./linux rootfstype=hostfs rw mem=1G init=/bin/bash -----Original Message----- From: Richard Weinberger [mailto:ri...@no...] Sent: Monday, June 02, 2014 12:06 PM To: Nalli, Sanketh Cc: enjoy mindful; use...@li... Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes Am 02.06.2014 20:53, schrieb Nalli, Sanketh: >>> And why does the /proc/PID/exe NOT point to anything in >>> >>> The host ? (PID is the pid of a dummy program running in UML) > >> Host PID != Guest PID > > Yes I know that. > That’s not what I meant. > > What I am trying to say is this : > 1. When you run a program in side UML it shows up on HOST as "linux" > in the ps -e listing > > 2. the "exe" symlink of that "linux" process in the /proc of the HOST > Is EMPTY !!! Not here: rw@sandpuppy:~> for i in `pidof linux` ; do ls -l /proc/$i/exe ; done lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31270/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31269/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31266/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31250/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31248/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31245/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31244/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31243/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/31237/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30784/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30783/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30759/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30686/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30685/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30684/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30683/exe -> /home/rw/linux/linux lrwxrwxrwx 1 rw users 0 2. Jun 21:05 /proc/30676/exe -> /home/rw/linux/linux What host kernel are you using? Thanks, //richard |
|
From: Richard W. <ri...@no...> - 2014-06-02 19:20:15
|
Am 02.06.2014 21:16, schrieb Nalli, Sanketh: > nalli@haris-crashnburn:~$ cd /proc/6188 > nalli@haris-crashnburn:/proc/6188$ ls -l exe What does "ls -la /proc/6188" show? Thanks, //richard |
|
From: Richard W. <ri...@no...> - 2014-06-02 20:14:45
|
Am 02.06.2014 22:11, schrieb Nalli, Sanketh: > Nothing..just lists all the contents including the hidden > Ones in a long listing fashion. Please show it verbatim. Thanks, //richard > -----Original Message----- > From: Richard Weinberger [mailto:ri...@no...] > Sent: Monday, June 02, 2014 12:20 PM > To: Nalli, Sanketh > Cc: use...@li... > Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes > > > > Am 02.06.2014 21:16, schrieb Nalli, Sanketh: >> nalli@haris-crashnburn:~$ cd /proc/6188 >> nalli@haris-crashnburn:/proc/6188$ ls -l exe > > What does "ls -la /proc/6188" show? > > Thanks, > //richard > |
|
From: Richard W. <ri...@no...> - 2014-06-02 20:40:54
|
Are you running UML under a debugger? Thanks, //richard Am 02.06.2014 22:16, schrieb Nalli, Sanketh: > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 wchan > nalli@haris-crashnburn:/proc/4755$ ls -la > ls: cannot read symbolic link exe: No such file or directory > total 0 > dr-xr-xr-x 9 nalli nalli 0 Jun 2 13:07 . > dr-xr-xr-x 346 root root 0 May 23 10:18 .. > dr-xr-xr-x 2 nalli nalli 0 Jun 2 13:07 attr > -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 autogroup > -r-------- 1 nalli nalli 0 Jun 2 13:07 auxv > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 cgroup > --w------- 1 nalli nalli 0 Jun 2 13:07 clear_refs > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 cmdline > -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 comm > -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 coredump_filter > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 cpuset > lrwxrwxrwx 1 nalli nalli 0 Jun 2 13:07 cwd -> /home/nalli/cache_cow/linux-3.5 > -r-------- 1 nalli nalli 0 Jun 2 13:07 environ > lrwxrwxrwx 1 nalli nalli 0 Jun 2 13:07 exe > dr-x------ 2 nalli nalli 0 Jun 2 13:07 fd > dr-x------ 2 nalli nalli 0 Jun 2 13:07 fdinfo > -r-------- 1 nalli nalli 0 Jun 2 13:07 io > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 latency > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 limits > -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 loginuid > dr-x------ 2 nalli nalli 0 Jun 2 13:07 map_files > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 maps > -rw------- 1 nalli nalli 0 Jun 2 13:07 mem > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 mountinfo > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 mounts > -r-------- 1 nalli nalli 0 Jun 2 13:07 mountstats > dr-xr-xr-x 5 nalli nalli 0 Jun 2 13:07 net > dr-x--x--x 2 nalli nalli 0 Jun 2 13:07 ns > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 numa_maps > -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 oom_adj > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 oom_score > -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 oom_score_adj > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 pagemap > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 personality > lrwxrwxrwx 1 nalli nalli 0 Jun 2 13:07 root -> / > -rw-r--r-- 1 nalli nalli 0 Jun 2 13:07 sched > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 schedstat > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 sessionid > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 smaps > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 stack > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 stat > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 statm > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 status > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 syscall > dr-xr-xr-x 3 nalli nalli 0 Jun 2 13:07 task > -r--r--r-- 1 nalli nalli 0 Jun 2 13:07 wchan > nalli@haris-crashnburn:/proc/4755$ killall linux > nalli@haris-crashnburn:/proc/4755$ > > -----Original Message----- > From: Richard Weinberger [mailto:ri...@no...] > Sent: Monday, June 02, 2014 1:15 PM > To: Nalli, Sanketh > Cc: use...@li... > Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes > > Am 02.06.2014 22:11, schrieb Nalli, Sanketh: >> Nothing..just lists all the contents including the hidden Ones in a >> long listing fashion. > > Please show it verbatim. > > Thanks, > //richard > >> -----Original Message----- >> From: Richard Weinberger [mailto:ri...@no...] >> Sent: Monday, June 02, 2014 12:20 PM >> To: Nalli, Sanketh >> Cc: use...@li... >> Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes >> >> >> >> Am 02.06.2014 21:16, schrieb Nalli, Sanketh: >>> nalli@haris-crashnburn:~$ cd /proc/6188 >>> nalli@haris-crashnburn:/proc/6188$ ls -l exe >> >> What does "ls -la /proc/6188" show? >> >> Thanks, >> //richard >> |
|
From: Richard W. <ri...@no...> - 2014-06-02 20:46:35
|
Am 02.06.2014 22:42, schrieb Nalli, Sanketh: > Nope, but here is some bootlog Hmm, I have no idea so far. Applications running under valgrind or other debuggers suffered from the issue that /proc/pid/exe is empty. > The host does not have skas3 patch > Do you think that is the problem ? Nope. SKAS0 works fine. > Which host shd I use that already has this patch > (I mean I cud patch the host myself but if there is one > Already present, that is good !) > > Core dump limits : > soft - 0 > hard - NONE > Checking that ptrace can change system call numbers...OK > Checking syscall emulation patch for ptrace...OK > Checking advanced syscall emulation patch for ptrace...OK > Checking for tmpfs mount on /dev/shm...nothing mounted on /dev/shm > Checking PROT_EXEC mmap in /tmp/...OK > Checking for new_mm and switch_mm support in the host: > /proc/self/mm ... Failed - > No such file or directory > Checking for the skas3 patch in the host: > - /proc/mm...not found: No such file or directory > - PTRACE_FAULTINFO...not found > - PTRACE_LDT...not found > UML running in SKAS0 mode > Adding 20606976 bytes to physical memory to account for exec-shield gap > Linux version 2.6.24-g91525300-dirty (jd...@am...) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)) #1 Mon Jan 28 12:03:41 EST 2008 Wow. This UML is horrible old. Thanks, //richard |
|
From: Nalli, S. <san...@hp...> - 2014-06-02 20:51:15
|
OK Checking for new_mm and switch_mm support in the host: > /proc/self/mm ... Failed - > No such file or directory > Checking for the skas3 patch in the host: > - /proc/mm...not found: No such file or directory > - PTRACE_FAULTINFO...not found > - PTRACE_LDT...not found > UML running in SKAS0 mode > Adding 20606976 bytes to physical memory to account for exec-shield > gap Linux version 2.6.24-g91525300-dirty > (jd...@am...) (gcc version 4.1.1 20070105 (Red Hat > 4.1.1-51)) #1 Mon Jan 28 12:03:41 EST 2008 Wow. This UML is horrible old. Well, it’s the latest kernel from kernel.org. Thanks, //richard |
|
From: Nalli, S. <san...@hp...> - 2014-06-03 01:30:21
|
Okay, so I've found a way around the invalid exe symlink. I don't need that anymore. The next challenge is concurrency in UML. I wrote a simple program that launches 10 pthreads, Each of which makes some system calls in an infinite loop. I notice that even though there are 10 threads in my dummy program, There is only ONE UML kernel thread. Is this correct ? If so, does this mean that UML kernel is serializing the execution ? Is there some way of making UML kernel multi-threaded ? -----Original Message----- From: Richard Weinberger [mailto:ri...@no...] Sent: Monday, June 02, 2014 1:46 PM To: Nalli, Sanketh Cc: use...@li... Subject: Re: [uml-user] invalid /proc/PID/exe in UML processes Am 02.06.2014 22:42, schrieb Nalli, Sanketh: > Nope, but here is some bootlog Hmm, I have no idea so far. Applications running under valgrind or other debuggers suffered from the issue that /proc/pid/exe is empty. > The host does not have skas3 patch > Do you think that is the problem ? Nope. SKAS0 works fine. > Which host shd I use that already has this patch (I mean I cud patch > the host myself but if there is one Already present, that is good !) > > Core dump limits : > soft - 0 > hard - NONE > Checking that ptrace can change system call numbers...OK Checking > syscall emulation patch for ptrace...OK Checking advanced syscall > emulation patch for ptrace...OK Checking for tmpfs mount on > /dev/shm...nothing mounted on /dev/shm Checking PROT_EXEC mmap in > /tmp/...OK Checking for new_mm and switch_mm support in the host: > /proc/self/mm ... Failed - > No such file or directory > Checking for the skas3 patch in the host: > - /proc/mm...not found: No such file or directory > - PTRACE_FAULTINFO...not found > - PTRACE_LDT...not found > UML running in SKAS0 mode > Adding 20606976 bytes to physical memory to account for exec-shield > gap Linux version 2.6.24-g91525300-dirty > (jd...@am...) (gcc version 4.1.1 20070105 (Red Hat > 4.1.1-51)) #1 Mon Jan 28 12:03:41 EST 2008 Wow. This UML is horrible old. Thanks, //richard |
|
From: Nalli, S. <san...@hp...> - 2014-06-02 20:52:09
|
Oh wait, sorry its not. -----Original Message----- From: Nalli, Sanketh Sent: Monday, June 02, 2014 1:50 PM To: 'Richard Weinberger' Cc: use...@li... Subject: RE: [uml-user] invalid /proc/PID/exe in UML processes OK Checking for new_mm and switch_mm support in the host: > /proc/self/mm ... Failed - > No such file or directory > Checking for the skas3 patch in the host: > - /proc/mm...not found: No such file or directory > - PTRACE_FAULTINFO...not found > - PTRACE_LDT...not found > UML running in SKAS0 mode > Adding 20606976 bytes to physical memory to account for exec-shield > gap Linux version 2.6.24-g91525300-dirty > (jd...@am...) (gcc version 4.1.1 20070105 (Red Hat > 4.1.1-51)) #1 Mon Jan 28 12:03:41 EST 2008 Wow. This UML is horrible old. Well, it’s the latest kernel from kernel.org. Thanks, //richard |
|
From: Nalli, S. <san...@hp...> - 2014-06-02 20:53:16
|
Here is some bootlog from 3.9
Core dump limits :
soft - 0
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking for tmpfs mount on /dev/shm...nothing mounted on /dev/shm
Checking PROT_EXEC mmap in /tmp/...OK
Checking for the skas3 patch in the host:
- /proc/mm...not found: No such file or directory
- PTRACE_FAULTINFO...not found
- PTRACE_LDT...not found
UML running in SKAS0 mode
Adding 12623872 bytes to physical memory to account for exec-shield gap
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 3.9.0 (nalli@haris-crashnburn) (gcc version 4.8.1 (Ubuntu 4.8.1-2ubuntu1~12.04) ) #1 Tue May 27 15:47:48 PDT 2014
-----Original Message-----
From: Nalli, Sanketh
Sent: Monday, June 02, 2014 1:51 PM
To: 'Richard Weinberger'
Cc: 'use...@li...'
Subject: RE: [uml-user] invalid /proc/PID/exe in UML processes
Oh wait, sorry its not.
-----Original Message-----
From: Nalli, Sanketh
Sent: Monday, June 02, 2014 1:50 PM
To: 'Richard Weinberger'
Cc: use...@li...
Subject: RE: [uml-user] invalid /proc/PID/exe in UML processes
OK Checking for new_mm and switch_mm support in the host:
> /proc/self/mm ... Failed -
> No such file or directory
> Checking for the skas3 patch in the host:
> - /proc/mm...not found: No such file or directory
> - PTRACE_FAULTINFO...not found
> - PTRACE_LDT...not found
> UML running in SKAS0 mode
> Adding 20606976 bytes to physical memory to account for exec-shield
> gap Linux version 2.6.24-g91525300-dirty
> (jd...@am...) (gcc version 4.1.1 20070105 (Red Hat
> 4.1.1-51)) #1 Mon Jan 28 12:03:41 EST 2008
Wow. This UML is horrible old.
Well, it’s the latest kernel from kernel.org.
Thanks,
//richard
|