All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] uml_net zombie processes
@ 2015-07-13 13:41 Thomas Meyer
  2015-07-13 13:52 ` Richard Weinberger
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Meyer @ 2015-07-13 13:41 UTC (permalink / raw)
  To: user-mode-linux-devel@lists.sourceforge.net

Hi,

The uml_net network setup "fails" on my computer with:

[   15.930000] helper_wait : waitpid process 11673 failed, errno = 10
[   15.930000] * modprobe tun
               * ifconfig tap0 192.168.10.1 netmask 255.255.255.255 up
               * bash -c echo 1 > /proc/sys/net/ipv4/ip_forward
[   20.480000] helper_wait : waitpid process 11780 failed, errno = 10
[   20.480000] * route add -host 192.168.10.2 dev tap0
               * bash -c echo 1 >
/proc/sys/net/ipv4/conf/tap0/proxy_arp

because I run uml linux as a normal user and I guess these commands
fail, because of insufficient rights:
bash -c echo 1 > /proc/sys/net/ipv4/ip_forward
bash -c echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp

But this failure is okay for me, as firewalld, sets above options
correctly on my host computer.

The problem I see is that UML list two zombie processes:
  11780 root       20   0     0     0     0 Z  0.0  0.0  0:00.00 15:34 │  │     ├─ uml_net
  11673 root       20   0     0     0     0 Z  0.0  0.0  0:00.00 15:34 │  │     ├─ uml_net

UML seems to never reap those two processes, likely because of errno=10 exit code.

any idea how to fix this?

with kind regards
thomas


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [uml-devel] uml_net zombie processes
  2015-07-13 13:41 [uml-devel] uml_net zombie processes Thomas Meyer
@ 2015-07-13 13:52 ` Richard Weinberger
  2015-07-13 13:58   ` Thomas Meyer
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Weinberger @ 2015-07-13 13:52 UTC (permalink / raw)
  To: Thomas Meyer; +Cc: user-mode-linux-devel@lists.sourceforge.net

On Mon, Jul 13, 2015 at 3:41 PM, Thomas Meyer <thomas@m3y3r.de> wrote:
> Hi,
>
> The uml_net network setup "fails" on my computer with:
>
> [   15.930000] helper_wait : waitpid process 11673 failed, errno = 10
> [   15.930000] * modprobe tun
>                * ifconfig tap0 192.168.10.1 netmask 255.255.255.255 up
>                * bash -c echo 1 > /proc/sys/net/ipv4/ip_forward
> [   20.480000] helper_wait : waitpid process 11780 failed, errno = 10
> [   20.480000] * route add -host 192.168.10.2 dev tap0
>                * bash -c echo 1 >
> /proc/sys/net/ipv4/conf/tap0/proxy_arp
>
> because I run uml linux as a normal user and I guess these commands
> fail, because of insufficient rights:
> bash -c echo 1 > /proc/sys/net/ipv4/ip_forward
> bash -c echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp
>
> But this failure is okay for me, as firewalld, sets above options
> correctly on my host computer.
>
> The problem I see is that UML list two zombie processes:
>   11780 root       20   0     0     0     0 Z  0.0  0.0  0:00.00 15:34 │  │     ├─ uml_net
>   11673 root       20   0     0     0     0 Z  0.0  0.0  0:00.00 15:34 │  │     ├─ uml_net
>
> UML seems to never reap those two processes, likely because of errno=10 exit code.
>
> any idea how to fix this?

Hmm, it tries to reap them using waitpid().
But it seems to fail with ECHILD.

Can you add a few prints to compare the PIDs?

-- 
Thanks,
//richard

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [uml-devel] uml_net zombie processes
  2015-07-13 13:52 ` Richard Weinberger
@ 2015-07-13 13:58   ` Thomas Meyer
  2015-07-13 14:00     ` Richard Weinberger
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Meyer @ 2015-07-13 13:58 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: user-mode-linux-devel@lists.sourceforge.net

Am Montag, den 13.07.2015, 15:52 +0200 schrieb Richard Weinberger:
> On Mon, Jul 13, 2015 at 3:41 PM, Thomas Meyer <thomas@m3y3r.de> 
> wrote:
> > Hi,
> > 
> > The uml_net network setup "fails" on my computer with:
> > 
> > [   15.930000] helper_wait : waitpid process 11673 failed, errno = 
> > 10
> > [   15.930000] * modprobe tun
> >                * ifconfig tap0 192.168.10.1 netmask 255.255.255.255 
> > up
> >                * bash -c echo 1 > /proc/sys/net/ipv4/ip_forward
> > [   20.480000] helper_wait : waitpid process 11780 failed, errno = 
> > 10
> > [   20.480000] * route add -host 192.168.10.2 dev tap0
> >                * bash -c echo 1 >
> > /proc/sys/net/ipv4/conf/tap0/proxy_arp
> > 
> > because I run uml linux as a normal user and I guess these commands
> > fail, because of insufficient rights:
> > bash -c echo 1 > /proc/sys/net/ipv4/ip_forward
> > bash -c echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp
> > 
> > But this failure is okay for me, as firewalld, sets above options
> > correctly on my host computer.
> > 
> > The problem I see is that UML list two zombie processes:
> >   11780 root       20   0     0     0     0 Z  0.0  0.0  0:00.00 
> > 15:34 │  │     ├─ uml_net
> >   11673 root       20   0     0     0     0 Z  0.0  0.0  0:00.00 
> > 15:34 │  │     ├─ uml_net
> > 
> > UML seems to never reap those two processes, likely because of 
> > errno=10 exit code.
> > 
> > any idea how to fix this?
> 
> Hmm, it tries to reap them using waitpid().
> But it seems to fail with ECHILD.
> 
> Can you add a few prints to compare the PIDs?

Sure, where should I add those?
os-Linux/helper.c - helper_wait(int pid) ?


> 


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [uml-devel] uml_net zombie processes
  2015-07-13 13:58   ` Thomas Meyer
@ 2015-07-13 14:00     ` Richard Weinberger
  2015-07-13 14:24       ` Thomas Meyer
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Weinberger @ 2015-07-13 14:00 UTC (permalink / raw)
  To: Thomas Meyer, Richard Weinberger
  Cc: user-mode-linux-devel@lists.sourceforge.net

Am 13.07.2015 um 15:58 schrieb Thomas Meyer:
> Am Montag, den 13.07.2015, 15:52 +0200 schrieb Richard Weinberger:
>> On Mon, Jul 13, 2015 at 3:41 PM, Thomas Meyer <thomas@m3y3r.de> 
>> wrote:
>>> Hi,
>>>
>>> The uml_net network setup "fails" on my computer with:
>>>
>>> [   15.930000] helper_wait : waitpid process 11673 failed, errno = 
>>> 10
>>> [   15.930000] * modprobe tun
>>>                * ifconfig tap0 192.168.10.1 netmask 255.255.255.255 
>>> up
>>>                * bash -c echo 1 > /proc/sys/net/ipv4/ip_forward
>>> [   20.480000] helper_wait : waitpid process 11780 failed, errno = 
>>> 10
>>> [   20.480000] * route add -host 192.168.10.2 dev tap0
>>>                * bash -c echo 1 >
>>> /proc/sys/net/ipv4/conf/tap0/proxy_arp
>>>
>>> because I run uml linux as a normal user and I guess these commands
>>> fail, because of insufficient rights:
>>> bash -c echo 1 > /proc/sys/net/ipv4/ip_forward
>>> bash -c echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp
>>>
>>> But this failure is okay for me, as firewalld, sets above options
>>> correctly on my host computer.
>>>
>>> The problem I see is that UML list two zombie processes:
>>>   11780 root       20   0     0     0     0 Z  0.0  0.0  0:00.00 
>>> 15:34 │  │     ├─ uml_net
>>>   11673 root       20   0     0     0     0 Z  0.0  0.0  0:00.00 
>>> 15:34 │  │     ├─ uml_net
>>>
>>> UML seems to never reap those two processes, likely because of 
>>> errno=10 exit code.
>>>
>>> any idea how to fix this?
>>
>> Hmm, it tries to reap them using waitpid().
>> But it seems to fail with ECHILD.
>>
>> Can you add a few prints to compare the PIDs?
> 
> Sure, where should I add those?
> os-Linux/helper.c - helper_wait(int pid) ?

Yeah. And please add a dump_stack() to figure out where it was called.

Thanks,
//richard

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [uml-devel] uml_net zombie processes
  2015-07-13 14:00     ` Richard Weinberger
@ 2015-07-13 14:24       ` Thomas Meyer
  2015-07-13 14:41         ` Richard Weinberger
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Meyer @ 2015-07-13 14:24 UTC (permalink / raw)
  To: Richard Weinberger, Richard Weinberger
  Cc: user-mode-linux-devel@lists.sourceforge.net

Am Montag, den 13.07.2015, 16:00 +0200 schrieb Richard Weinberger:
> Am 13.07.2015 um 15:58 schrieb Thomas Meyer:
> > Am Montag, den 13.07.2015, 15:52 +0200 schrieb Richard Weinberger:
> > > On Mon, Jul 13, 2015 at 3:41 PM, Thomas Meyer <thomas@m3y3r.de> 
> > > wrote:
> > > > Hi,
> > > > 
> > > > The uml_net network setup "fails" on my computer with:
> > > > 
> > > > [   15.930000] helper_wait : waitpid process 11673 failed, 
> > > > errno = 
> > > > 10
> > > > [   15.930000] * modprobe tun
> > > >                * ifconfig tap0 192.168.10.1 netmask 
> > > > 255.255.255.255 
> > > > up
> > > >                * bash -c echo 1 > /proc/sys/net/ipv4/ip_forward
> > > > [   20.480000] helper_wait : waitpid process 11780 failed, 
> > > > errno = 
> > > > 10
> > > > [   20.480000] * route add -host 192.168.10.2 dev tap0
> > > >                * bash -c echo 1 >
> > > > /proc/sys/net/ipv4/conf/tap0/proxy_arp
> > > > 
> > > > because I run uml linux as a normal user and I guess these 
> > > > commands
> > > > fail, because of insufficient rights:
> > > > bash -c echo 1 > /proc/sys/net/ipv4/ip_forward
> > > > bash -c echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp
> > > > 
> > > > But this failure is okay for me, as firewalld, sets above 
> > > > options
> > > > correctly on my host computer.
> > > > 
> > > > The problem I see is that UML list two zombie processes:
> > > >   11780 root       20   0     0     0     0 Z  0.0  0.0 
> > > >  0:00.00 
> > > > 15:34 │  │     ├─ uml_net
> > > >   11673 root       20   0     0     0     0 Z  0.0  0.0 
> > > >  0:00.00 
> > > > 15:34 │  │     ├─ uml_net
> > > > 
> > > > UML seems to never reap those two processes, likely because of 
> > > > errno=10 exit code.
> > > > 
> > > > any idea how to fix this?
> > > 
> > > Hmm, it tries to reap them using waitpid().
> > > But it seems to fail with ECHILD.
> > > 
> > > Can you add a few prints to compare the PIDs?
> > 
> > Sure, where should I add those?
> > os-Linux/helper.c - helper_wait(int pid) ?
> 
> Yeah. And please add a dump_stack() to figure out where it was 
> called.

I think calling dump_stack() somehow changed the errno to 25?!

[   19.600000] CPU: 0 PID: 282 Comm: ip Not tainted 4.2.0-rc1-00089-g1ee9c9e-dirty #256
[   19.600000] Stack:
[   19.600000]  6caf14a0 60089462 ffffffff00000013 7fa4a5ab3698
[   19.600000]  00006b41 60028d90 6caf14b0 60623767
[   19.600000]  6caf14f0 60040c0c 00000000 6caf1590
[   19.600000] Call Trace:
[   19.600000]  [<606206d9>] ? printk+0x0/0x94
[   19.600000]  [<6002c85b>] show_stack+0xdb/0x1a0
[   19.600000]  [<60089462>] ? dump_stack_print_info+0xd2/0xf0
[   19.600000]  [<60623767>] dump_stack+0x2a/0x2c
[   19.600000]  [<60040c0c>] helper_wait+0x7c/0xd0
[   19.600000]  [<60044e5e>] tuntap_open_tramp.constprop.0+0x15e/0x270
[   19.600000]  [<60466a60>] ? dev_set_rx_mode+0x0/0x50
[   19.600000]  [<6004501f>] tuntap_open+0xaf/0x2d0
[   19.600000]  [<60044fdb>] ? tuntap_open+0x6b/0x2d0
[   19.600000]  [<6006f64f>] ? notifier_call_chain+0x4f/0x80
[   19.600000]  [<60466a60>] ? dev_set_rx_mode+0x0/0x50
[   19.600000]  [<60035ccd>] uml_net_open+0x2d/0x140
[   19.600000]  [<60466b57>] __dev_open+0xa7/0x130
[   19.600000]  [<60466a9e>] ? dev_set_rx_mode+0x3e/0x50
[   19.600000]  [<60466ee4>] __dev_change_flags+0xb4/0x1a0
[   19.600000]  [<60466ffb>] dev_change_flags+0x2b/0x70
[   19.600000]  [<6047a9c8>] do_setlink+0x318/0x8f0
[   19.600000]  [<603d24b9>] ? nla_parse+0x39/0x140
[   19.600000]  [<60045330>] ? run_syscall_stub+0xf0/0x350
[   19.600000]  [<6047b7ae>] rtnl_newlink+0x6ae/0xa10
[   19.600000]  [<60042ff0>] ? set_signals+0x0/0x50
[   19.600000]  [<60042d00>] ? change_sig+0x70/0x80
[   19.600000]  [<6004302f>] ? set_signals+0x3f/0x50
[   19.600000]  [<6034e227>] ? avc_has_perm_noaudit+0x57/0x120
[   19.600000]  [<6047bc34>] rtnetlink_rcv_msg+0x94/0x280
[   19.600000]  [<60042ff0>] ? set_signals+0x0/0x50
[   19.600000]  [<6047dda0>] ? sk_filter+0x0/0xe0
[   19.600000]  [<6044de30>] ? skb_pull+0x0/0x90
[   19.600000]  [<6047bba0>] ? rtnetlink_rcv_msg+0x0/0x280
[   19.600000]  [<6048db00>] ? netlink_ack+0x0/0x170
[   19.600000]  [<6048dd39>] netlink_rcv_skb+0xc9/0x100
[   19.600000]  [<6047dda0>] ? sk_filter+0x0/0xe0
[   19.600000]  [<6047bb8b>] rtnetlink_rcv+0x3b/0x50
[   19.600000]  [<6048d4dd>] netlink_unicast+0x1cd/0x2b0
[   19.600000]  [<6048da8e>] netlink_sendmsg+0x3ee/0x460
[   19.600000]  [<6034f3da>] ? selinux_socket_sendmsg+0x2a/0x30
[   19.600000]  [<60442c8a>] sock_sendmsg+0x3a/0x90
[   19.600000]  [<6044480a>] ___sys_sendmsg+0x30a/0x320
[   19.600000]  [<6004592a>] ? map+0x4a/0x50
[   19.600000]  [<600fc150>] ? handle_mm_fault+0x0/0x1590
[   19.600000]  [<6002dcd5>] ? handle_page_fault+0x265/0x350
[   19.600000]  [<6002e1fe>] ? segv+0x28e/0x3e0
[   19.600000]  [<60445b61>] __sys_sendmsg+0x51/0xa0
[   19.600000]  [<60445bc0>] SyS_sendmsg+0x10/0x20
[   19.600000]  [<6002ef3e>] handle_syscall+0x6e/0xa0
[   19.600000]  [<60046552>] userspace+0x3f2/0x4e0
[   19.600000]  [<6002f253>] ? do_op_one_page+0x153/0x240
[   19.600000]  [<60041a4f>] ? save_registers+0x1f/0x40
[   19.600000]  [<60049816>] ? arch_prctl+0x1f6/0x220
[   19.600000]  [<6002b065>] fork_handler+0x85/0x90

[   19.600000] helper_wait : waitpid process 27457 failed, errno = 25
[   19.600000] * modprobe tun
               * ifconfig tap0 192.168.10.1 netmask 255.255.255.255 up
               * bash -c echo 1 > /proc/sys/net/ipv4/ip_forward
[   19.780000] ip (282) used greatest stack depth: 3616 bytes left
[   24.120000] CPU: 0 PID: 305 Comm: ip Not tainted 4.2.0-rc1-00089-g1ee9c9e-dirty #256
[   24.120000] Stack:
[   24.120000]  6caab720 60089462 ffffffff00000014 7fa4a5ab3698
[   24.120000]  00006b94 60028d90 6caab730 60623767
[   24.120000]  6caab770 60040c0c 6caab8b0 70ac2000
[   24.120000] Call Trace:
[   24.120000]  [<600d767e>] ? __free_pages+0x3e/0xa0
[   24.120000]  [<606206d9>] ? printk+0x0/0x94
[   24.120000]  [<6002c85b>] show_stack+0xdb/0x1a0
[   24.120000]  [<60089462>] ? dump_stack_print_info+0xd2/0xf0
[   24.120000]  [<60623767>] dump_stack+0x2a/0x2c
[   24.120000]  [<60040c0c>] helper_wait+0x7c/0xd0
[   24.120000]  [<60037233>] change+0x193/0x240
[   24.120000]  [<60571a40>] ? fib_magic.isra.1+0x0/0xd0
[   24.120000]  [<60044c00>] ? tuntap_add_addr+0x0/0x70
[   24.120000]  [<60037596>] open_addr+0x26/0x30
[   24.120000]  [<60044c5d>] tuntap_add_addr+0x5d/0x70
[   24.120000]  [<60571a40>] ? fib_magic.isra.1+0x0/0xd0
[   24.120000]  [<60048f40>] ? __memcpy+0x0/0x20
[   24.120000]  [<60035769>] uml_inetaddr_event+0x99/0xc0
[   24.120000]  [<6057302a>] ? fib_inetaddr_event+0x9a/0xc0
[   24.120000]  [<6006f64f>] notifier_call_chain+0x4f/0x80
[   24.120000]  [<6006fb64>] __blocking_notifier_call_chain+0x54/0x80
[   24.120000]  [<60476920>] ? rtnl_is_locked+0x0/0x20
[   24.120000]  [<6006fba8>] blocking_notifier_call_chain+0x18/0x20
[   24.120000]  [<605685e5>] __inet_insert_ifa+0x1a5/0x2d0
[   24.120000]  [<605690d9>] inet_rtm_newaddr+0x1e9/0x4c0
[   24.120000]  [<6047bc34>] rtnetlink_rcv_msg+0x94/0x280
[   24.120000]  [<60042ff0>] ? set_signals+0x0/0x50
[   24.120000]  [<6047dda0>] ? sk_filter+0x0/0xe0
[   24.120000]  [<6044de30>] ? skb_pull+0x0/0x90
[   24.120000]  [<6047bba0>] ? rtnetlink_rcv_msg+0x0/0x280
[   24.120000]  [<6048db00>] ? netlink_ack+0x0/0x170
[   24.120000]  [<6048dd39>] netlink_rcv_skb+0xc9/0x100
[   24.120000]  [<6047dda0>] ? sk_filter+0x0/0xe0
[   24.120000]  [<6047bb8b>] rtnetlink_rcv+0x3b/0x50
[   24.120000]  [<6048d4dd>] netlink_unicast+0x1cd/0x2b0
[   24.120000]  [<6048da8e>] netlink_sendmsg+0x3ee/0x460
[   24.120000]  [<6034f3da>] ? selinux_socket_sendmsg+0x2a/0x30
[   24.120000]  [<60442c8a>] sock_sendmsg+0x3a/0x90
[   24.120000]  [<6044480a>] ___sys_sendmsg+0x30a/0x320
[   24.120000]  [<6004592a>] ? map+0x4a/0x50
[   24.120000]  [<600fc150>] ? handle_mm_fault+0x0/0x1590
[   24.120000]  [<6002dcd5>] ? handle_page_fault+0x265/0x350
[   24.120000]  [<6002e1fe>] ? segv+0x28e/0x3e0
[   24.120000]  [<60445b61>] __sys_sendmsg+0x51/0xa0
[   24.120000]  [<60445bc0>] SyS_sendmsg+0x10/0x20
[   24.120000]  [<6002ef3e>] handle_syscall+0x6e/0xa0
[   24.120000]  [<60046552>] userspace+0x3f2/0x4e0
[   24.120000]  [<6002f253>] ? do_op_one_page+0x153/0x240
[   24.120000]  [<60041a4f>] ? save_registers+0x1f/0x40
[   24.120000]  [<60049816>] ? arch_prctl+0x1f6/0x220
[   24.120000]  [<6002b065>] fork_handler+0x85/0x90

[   24.120000] helper_wait : waitpid process 27540 failed, errno = 25
[   24.120000] * route add -host 192.168.10.2 dev tap0
               * bash -c echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp


diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c
index e3ee4a5..683460f 100644
--- a/arch/um/os-Linux/helper.c
+++ b/arch/um/os-Linux/helper.c
@@ -14,6 +14,8 @@
 #include <os.h>
 #include <um_malloc.h>
 
+extern __attribute__((regparm(0))) void dump_stack(void);
+
 struct helper_data {
 	void (*pre_exec)(void*);
 	void *pre_data;
@@ -152,6 +154,7 @@ int helper_wait(int pid)
 
 	CATCH_EINTR(ret = waitpid(pid, &status, wflags));
 	if (ret < 0) {
+		dump_stack();
 		printk(UM_KERN_ERR "helper_wait : waitpid process %d
failed, "
 		       "errno = %d\n", pid, errno);
 		return -errno;



------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [uml-devel] uml_net zombie processes
  2015-07-13 14:24       ` Thomas Meyer
@ 2015-07-13 14:41         ` Richard Weinberger
  2015-07-13 15:08           ` Thomas Meyer
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Weinberger @ 2015-07-13 14:41 UTC (permalink / raw)
  To: Thomas Meyer; +Cc: user-mode-linux-devel@lists.sourceforge.net

Am 13.07.2015 um 16:24 schrieb Thomas Meyer:
>> Yeah. And please add a dump_stack() to figure out where it was 
>> called.
> 
> I think calling dump_stack() somehow changed the errno to 25?!

>  
> +extern __attribute__((regparm(0))) void dump_stack(void);

Hmm, maybe the regparm(0) kills your stack.
Anyway, how do you trigger the issue?
I tried here and don't see any zombie processes?
In my setup I run UML as non-root and tap0 is owned by root.
-> UML is unable to setup eth0.
But no zombies here.

Thanks,
//richard

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [uml-devel] uml_net zombie processes
  2015-07-13 14:41         ` Richard Weinberger
@ 2015-07-13 15:08           ` Thomas Meyer
  2015-07-13 15:11             ` Richard Weinberger
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Meyer @ 2015-07-13 15:08 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: user-mode-linux-devel@lists.sourceforge.net

Am Montag, den 13.07.2015, 16:41 +0200 schrieb Richard Weinberger:
> Am 13.07.2015 um 16:24 schrieb Thomas Meyer:
> > > Yeah. And please add a dump_stack() to figure out where it was 
> > > called.
> > 
> > I think calling dump_stack() somehow changed the errno to 25?!
> 
> >  
> > +extern __attribute__((regparm(0))) void dump_stack(void);
> 
> Hmm, maybe the regparm(0) kills your stack.
> Anyway, how do you trigger the issue?
> I tried here and don't see any zombie processes?
> In my setup I run UML as non-root and tap0 is owned by root.
> -> UML is unable to setup eth0.
> But no zombies here.

I run UML as non-root user, tun is:

$ ll /dev/net
insgesamt 0
crw-rw----. 1 root zml-net 10, 200 13. Jul 14:49 tun

$ ll /usr/bin/uml_net
-rwsr-x---. 1 root uml-net 31472 19. Aug 2014  /usr/bin/uml_net

> 
> Thanks,
> //richard
> 
> ---------------------------------------------------------------------
> ---------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> User-mode-linux-devel mailing list
> User-mode-linux-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [uml-devel] uml_net zombie processes
  2015-07-13 15:08           ` Thomas Meyer
@ 2015-07-13 15:11             ` Richard Weinberger
  2015-07-13 15:12               ` Thomas Meyer
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Weinberger @ 2015-07-13 15:11 UTC (permalink / raw)
  To: Thomas Meyer; +Cc: user-mode-linux-devel@lists.sourceforge.net

Am 13.07.2015 um 17:08 schrieb Thomas Meyer:
> Am Montag, den 13.07.2015, 16:41 +0200 schrieb Richard Weinberger:
>> Am 13.07.2015 um 16:24 schrieb Thomas Meyer:
>>>> Yeah. And please add a dump_stack() to figure out where it was 
>>>> called.
>>>
>>> I think calling dump_stack() somehow changed the errno to 25?!
>>
>>>  
>>> +extern __attribute__((regparm(0))) void dump_stack(void);
>>
>> Hmm, maybe the regparm(0) kills your stack.
>> Anyway, how do you trigger the issue?
>> I tried here and don't see any zombie processes?
>> In my setup I run UML as non-root and tap0 is owned by root.
>> -> UML is unable to setup eth0.
>> But no zombies here.
> 
> I run UML as non-root user, tun is:
> 
> $ ll /dev/net
> insgesamt 0
> crw-rw----. 1 root zml-net 10, 200 13. Jul 14:49 tun
> 
> $ ll /usr/bin/uml_net
> -rwsr-x---. 1 root uml-net 31472 19. Aug 2014  /usr/bin/uml_net

And eth0=tuntap,tap?

Thanks,
//richard

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [uml-devel] uml_net zombie processes
  2015-07-13 15:11             ` Richard Weinberger
@ 2015-07-13 15:12               ` Thomas Meyer
  2015-07-15 10:12                 ` Richard Weinberger
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Meyer @ 2015-07-13 15:12 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: user-mode-linux-devel@lists.sourceforge.net

Am Montag, den 13.07.2015, 17:11 +0200 schrieb Richard Weinberger:
> Am 13.07.2015 um 17:08 schrieb Thomas Meyer:
> > Am Montag, den 13.07.2015, 16:41 +0200 schrieb Richard Weinberger:
> > > Am 13.07.2015 um 16:24 schrieb Thomas Meyer:
> > > > > Yeah. And please add a dump_stack() to figure out where it 
> > > > > was 
> > > > > called.
> > > > 
> > > > I think calling dump_stack() somehow changed the errno to 25?!
> > > 
> > > >  
> > > > +extern __attribute__((regparm(0))) void dump_stack(void);
> > > 
> > > Hmm, maybe the regparm(0) kills your stack.
> > > Anyway, how do you trigger the issue?
> > > I tried here and don't see any zombie processes?
> > > In my setup I run UML as non-root and tap0 is owned by root.
> > > -> UML is unable to setup eth0.
> > > But no zombies here.
> > 
> > I run UML as non-root user, tun is:
> > 
> > $ ll /dev/net
> > insgesamt 0
> > crw-rw----. 1 root zml-net 10, 200 13. Jul 14:49 tun
> > 
> > $ ll /usr/bin/uml_net
> > -rwsr-x---. 1 root uml-net 31472 19. Aug 2014  /usr/bin/uml_net
> 
> And eth0=tuntap,tap?

yes,

eth0=tuntap,,,192.168.10.2

> 
> Thanks,
> //richard


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [uml-devel] uml_net zombie processes
  2015-07-13 15:12               ` Thomas Meyer
@ 2015-07-15 10:12                 ` Richard Weinberger
  2015-07-15 13:58                   ` Thomas Meyer
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Weinberger @ 2015-07-15 10:12 UTC (permalink / raw)
  To: Thomas Meyer; +Cc: user-mode-linux-devel@lists.sourceforge.net

On Mon, Jul 13, 2015 at 5:12 PM, Thomas Meyer <thomas@m3y3r.de> wrote:
> Am Montag, den 13.07.2015, 17:11 +0200 schrieb Richard Weinberger:
>> Am 13.07.2015 um 17:08 schrieb Thomas Meyer:
>> > Am Montag, den 13.07.2015, 16:41 +0200 schrieb Richard Weinberger:
>> > > Am 13.07.2015 um 16:24 schrieb Thomas Meyer:
>> > > > > Yeah. And please add a dump_stack() to figure out where it
>> > > > > was
>> > > > > called.
>> > > >
>> > > > I think calling dump_stack() somehow changed the errno to 25?!
>> > >
>> > > >
>> > > > +extern __attribute__((regparm(0))) void dump_stack(void);
>> > >
>> > > Hmm, maybe the regparm(0) kills your stack.
>> > > Anyway, how do you trigger the issue?
>> > > I tried here and don't see any zombie processes?
>> > > In my setup I run UML as non-root and tap0 is owned by root.
>> > > -> UML is unable to setup eth0.
>> > > But no zombies here.
>> >
>> > I run UML as non-root user, tun is:
>> >
>> > $ ll /dev/net
>> > insgesamt 0
>> > crw-rw----. 1 root zml-net 10, 200 13. Jul 14:49 tun
>> >
>> > $ ll /usr/bin/uml_net
>> > -rwsr-x---. 1 root uml-net 31472 19. Aug 2014  /usr/bin/uml_net
>>
>> And eth0=tuntap,tap?
>
> yes,
>
> eth0=tuntap,,,192.168.10.2

Sorry for the late reply.
I'm still burred in work issues and had no time to look in detail at this.

But in the meanwhile you can try to gather some more Infos.
Remove the dump_stack() and add some printk()s.
I'm interested which PIDs are returned and waited for.

-- 
Thanks,
//richard

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [uml-devel] uml_net zombie processes
  2015-07-15 10:12                 ` Richard Weinberger
@ 2015-07-15 13:58                   ` Thomas Meyer
  2015-08-09 17:57                     ` Richard Weinberger
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Meyer @ 2015-07-15 13:58 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: user-mode-linux-devel@lists.sourceforge.net

Am Mittwoch, den 15.07.2015, 12:12 +0200 schrieb Richard Weinberger:
> On Mon, Jul 13, 2015 at 5:12 PM, Thomas Meyer <thomas@m3y3r.de> 
> wrote:
> > Am Montag, den 13.07.2015, 17:11 +0200 schrieb Richard Weinberger:
> > > Am 13.07.2015 um 17:08 schrieb Thomas Meyer:
> > > > Am Montag, den 13.07.2015, 16:41 +0200 schrieb Richard 
> > > > Weinberger:
> > > > > Am 13.07.2015 um 16:24 schrieb Thomas Meyer:
> > > > > > > Yeah. And please add a dump_stack() to figure out where 
> > > > > > > it
> > > > > > > was
> > > > > > > called.
> > > > > > 
> > > > > > I think calling dump_stack() somehow changed the errno to 
> > > > > > 25?!
> > > > > 
> > > > > > 
> > > > > > +extern __attribute__((regparm(0))) void dump_stack(void);
> > > > > 
> > > > > Hmm, maybe the regparm(0) kills your stack.
> > > > > Anyway, how do you trigger the issue?
> > > > > I tried here and don't see any zombie processes?
> > > > > In my setup I run UML as non-root and tap0 is owned by root.
> > > > > -> UML is unable to setup eth0.
> > > > > But no zombies here.
> > > > 
> > > > I run UML as non-root user, tun is:
> > > > 
> > > > $ ll /dev/net
> > > > insgesamt 0
> > > > crw-rw----. 1 root zml-net 10, 200 13. Jul 14:49 tun
> > > > 
> > > > $ ll /usr/bin/uml_net
> > > > -rwsr-x---. 1 root uml-net 31472 19. Aug 2014  /usr/bin/uml_net
> > > 
> > > And eth0=tuntap,tap?
> > 
> > yes,
> > 
> > eth0=tuntap,,,192.168.10.2
> 
> Sorry for the late reply.
Hi,

null problemo.

> I'm still burred in work issues and had no time to look in detail at 
> this.
> 
> But in the meanwhile you can try to gather some more Infos.
> Remove the dump_stack() and add some printk()s.
> I'm interested which PIDs are returned and waited for.

Mhh.. I think the pid is already printed in error case:

[   15.930000] helper_wait : waitpid process 11673 failed, errno = 10
[   15.930000] * modprobe tun
               * ifconfig tap0 192.168.10.1 netmask 255.255.255.255 up
               * bash -c echo 1 > /proc/sys/net/ipv4/ip_forward
[   20.480000] helper_wait : waitpid process 11780 failed, errno = 10
[   20.480000] * route add -host 192.168.10.2 dev tap0
               * bash -c echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp

pid 11673 and pid 11780 in above case were the two zombie processes.

errno 10 = ECHILD

which can happen for the waitpid() call, according to the man page:

       ECHILD (for  waitpid()  or waitid()) The process specified by pid (waitpid()) or idtype and id (waitid()) does not exist or
              is not a child of the calling process.  (This can happen for one's own child if the action for  SIGCHLD  is  set  to
              SIG_IGN.  See also the Linux Notes section about threads.)

I'm not able to completely figure out above meaning, so...
But maybe ECHILD is returned because uml_net is run with setuid bit
set?

any ideas?


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [uml-devel] uml_net zombie processes
  2015-07-15 13:58                   ` Thomas Meyer
@ 2015-08-09 17:57                     ` Richard Weinberger
  2015-08-09 18:22                       ` Thomas Meyer
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Weinberger @ 2015-08-09 17:57 UTC (permalink / raw)
  To: Thomas Meyer; +Cc: user-mode-linux-devel@lists.sourceforge.net

[-- Attachment #1: Type: text/plain, Size: 3072 bytes --]

On Wed, Jul 15, 2015 at 3:58 PM, Thomas Meyer <thomas@m3y3r.de> wrote:
> Am Mittwoch, den 15.07.2015, 12:12 +0200 schrieb Richard Weinberger:
>> On Mon, Jul 13, 2015 at 5:12 PM, Thomas Meyer <thomas@m3y3r.de>
>> wrote:
>> > Am Montag, den 13.07.2015, 17:11 +0200 schrieb Richard Weinberger:
>> > > Am 13.07.2015 um 17:08 schrieb Thomas Meyer:
>> > > > Am Montag, den 13.07.2015, 16:41 +0200 schrieb Richard
>> > > > Weinberger:
>> > > > > Am 13.07.2015 um 16:24 schrieb Thomas Meyer:
>> > > > > > > Yeah. And please add a dump_stack() to figure out where
>> > > > > > > it
>> > > > > > > was
>> > > > > > > called.
>> > > > > >
>> > > > > > I think calling dump_stack() somehow changed the errno to
>> > > > > > 25?!
>> > > > >
>> > > > > >
>> > > > > > +extern __attribute__((regparm(0))) void dump_stack(void);
>> > > > >
>> > > > > Hmm, maybe the regparm(0) kills your stack.
>> > > > > Anyway, how do you trigger the issue?
>> > > > > I tried here and don't see any zombie processes?
>> > > > > In my setup I run UML as non-root and tap0 is owned by root.
>> > > > > -> UML is unable to setup eth0.
>> > > > > But no zombies here.
>> > > >
>> > > > I run UML as non-root user, tun is:
>> > > >
>> > > > $ ll /dev/net
>> > > > insgesamt 0
>> > > > crw-rw----. 1 root zml-net 10, 200 13. Jul 14:49 tun
>> > > >
>> > > > $ ll /usr/bin/uml_net
>> > > > -rwsr-x---. 1 root uml-net 31472 19. Aug 2014  /usr/bin/uml_net
>> > >
>> > > And eth0=tuntap,tap?
>> >
>> > yes,
>> >
>> > eth0=tuntap,,,192.168.10.2
>>
>> Sorry for the late reply.
> Hi,
>
> null problemo.
>
>> I'm still burred in work issues and had no time to look in detail at
>> this.
>>
>> But in the meanwhile you can try to gather some more Infos.
>> Remove the dump_stack() and add some printk()s.
>> I'm interested which PIDs are returned and waited for.
>
> Mhh.. I think the pid is already printed in error case:
>
> [   15.930000] helper_wait : waitpid process 11673 failed, errno = 10
> [   15.930000] * modprobe tun
>                * ifconfig tap0 192.168.10.1 netmask 255.255.255.255 up
>                * bash -c echo 1 > /proc/sys/net/ipv4/ip_forward
> [   20.480000] helper_wait : waitpid process 11780 failed, errno = 10
> [   20.480000] * route add -host 192.168.10.2 dev tap0
>                * bash -c echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp
>
> pid 11673 and pid 11780 in above case were the two zombie processes.
>
> errno 10 = ECHILD
>
> which can happen for the waitpid() call, according to the man page:
>
>        ECHILD (for  waitpid()  or waitid()) The process specified by pid (waitpid()) or idtype and id (waitid()) does not exist or
>               is not a child of the calling process.  (This can happen for one's own child if the action for  SIGCHLD  is  set  to
>               SIG_IGN.  See also the Linux Notes section about threads.)
>
> I'm not able to completely figure out above meaning, so...
> But maybe ECHILD is returned because uml_net is run with setuid bit
> set?
>
> any ideas?

The attached fix should fix the issue. Please confirm.

-- 
Thanks,
//richard

[-- Attachment #2: uml_waitpid.diff --]
[-- Type: text/plain, Size: 1009 bytes --]

diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c
index e3ee4a5..3f02d42 100644
--- a/arch/um/os-Linux/helper.c
+++ b/arch/um/os-Linux/helper.c
@@ -96,7 +96,7 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv)
 			       "ret = %d\n", -n);
 			ret = n;
 		}
-		CATCH_EINTR(waitpid(pid, NULL, __WCLONE));
+		CATCH_EINTR(waitpid(pid, NULL, __WALL));
 	}
 
 out_free2:
@@ -129,7 +129,7 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags,
 		return err;
 	}
 	if (stack_out == NULL) {
-		CATCH_EINTR(pid = waitpid(pid, &status, __WCLONE));
+		CATCH_EINTR(pid = waitpid(pid, &status, __WALL));
 		if (pid < 0) {
 			err = -errno;
 			printk(UM_KERN_ERR "run_helper_thread - wait failed, "
@@ -148,7 +148,7 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags,
 int helper_wait(int pid)
 {
 	int ret, status;
-	int wflags = __WCLONE;
+	int wflags = __WALL;
 
 	CATCH_EINTR(ret = waitpid(pid, &status, wflags));
 	if (ret < 0) {

[-- Attachment #3: Type: text/plain, Size: 79 bytes --]

------------------------------------------------------------------------------

[-- Attachment #4: Type: text/plain, Size: 194 bytes --]

_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [uml-devel] uml_net zombie processes
  2015-08-09 17:57                     ` Richard Weinberger
@ 2015-08-09 18:22                       ` Thomas Meyer
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Meyer @ 2015-08-09 18:22 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: user-mode-linux-devel@lists.sourceforge.net

Am Sonntag, den 09.08.2015, 19:57 +0200 schrieb Richard Weinberger:
> On Wed, Jul 15, 2015 at 3:58 PM, Thomas Meyer <thomas@m3y3r.de> 
> wrote:
> > Am Mittwoch, den 15.07.2015, 12:12 +0200 schrieb Richard 
> > Weinberger:
> > > On Mon, Jul 13, 2015 at 5:12 PM, Thomas Meyer <thomas@m3y3r.de>
> > > wrote:
> > > > Am Montag, den 13.07.2015, 17:11 +0200 schrieb Richard 
> > > > Weinberger:
> > > > > Am 13.07.2015 um 17:08 schrieb Thomas Meyer:
> > > > > > Am Montag, den 13.07.2015, 16:41 +0200 schrieb Richard
> > > > > > Weinberger:
> > > > > > > Am 13.07.2015 um 16:24 schrieb Thomas Meyer:
> > > > > > > > > Yeah. And please add a dump_stack() to figure out 
> > > > > > > > > where
> > > > > > > > > it
> > > > > > > > > was
> > > > > > > > > called.
> > > > > > > > 
> > > > > > > > I think calling dump_stack() somehow changed the errno 
> > > > > > > > to
> > > > > > > > 25?!
> > > > > > > 
> > > > > > > > 
> > > > > > > > +extern __attribute__((regparm(0))) void 
> > > > > > > > dump_stack(void);
> > > > > > > 
> > > > > > > Hmm, maybe the regparm(0) kills your stack.
> > > > > > > Anyway, how do you trigger the issue?
> > > > > > > I tried here and don't see any zombie processes?
> > > > > > > In my setup I run UML as non-root and tap0 is owned by 
> > > > > > > root.
> > > > > > > -> UML is unable to setup eth0.
> > > > > > > But no zombies here.
> > > > > > 
> > > > > > I run UML as non-root user, tun is:
> > > > > > 
> > > > > > $ ll /dev/net
> > > > > > insgesamt 0
> > > > > > crw-rw----. 1 root zml-net 10, 200 13. Jul 14:49 tun
> > > > > > 
> > > > > > $ ll /usr/bin/uml_net
> > > > > > -rwsr-x---. 1 root uml-net 31472 19. Aug 2014 
> > > > > >  /usr/bin/uml_net
> > > > > 
> > > > > And eth0=tuntap,tap?
> > > > 
> > > > yes,
> > > > 
> > > > eth0=tuntap,,,192.168.10.2
> > > 
> > > Sorry for the late reply.
> > Hi,
> > 
> > null problemo.
> > 
> > > I'm still burred in work issues and had no time to look in detail 
> > > at
> > > this.
> > > 
> > > But in the meanwhile you can try to gather some more Infos.
> > > Remove the dump_stack() and add some printk()s.
> > > I'm interested which PIDs are returned and waited for.
> > 
> > Mhh.. I think the pid is already printed in error case:
> > 
> > [   15.930000] helper_wait : waitpid process 11673 failed, errno = 
> > 10
> > [   15.930000] * modprobe tun
> >                * ifconfig tap0 192.168.10.1 netmask 255.255.255.255 
> > up
> >                * bash -c echo 1 > /proc/sys/net/ipv4/ip_forward
> > [   20.480000] helper_wait : waitpid process 11780 failed, errno = 
> > 10
> > [   20.480000] * route add -host 192.168.10.2 dev tap0
> >                * bash -c echo 1 > 
> > /proc/sys/net/ipv4/conf/tap0/proxy_arp
> > 
> > pid 11673 and pid 11780 in above case were the two zombie 
> > processes.
> > 
> > errno 10 = ECHILD
> > 
> > which can happen for the waitpid() call, according to the man page:
> > 
> >        ECHILD (for  waitpid()  or waitid()) The process specified 
> > by pid (waitpid()) or idtype and id (waitid()) does not exist or
> >               is not a child of the calling process.  (This can 
> > happen for one's own child if the action for  SIGCHLD  is  set  to
> >               SIG_IGN.  See also the Linux Notes section about 
> > threads.)
> > 
> > I'm not able to completely figure out above meaning, so...
> > But maybe ECHILD is returned because uml_net is run with setuid bit
> > set?
> > 
> > any ideas?
> 
> The attached fix should fix the issue. Please confirm.
> 

Hi,

yes, the uml_net zombie processes are gone now!

many thanks for this patch!

with kind regards
thomas


------------------------------------------------------------------------------
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-08-09 18:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-13 13:41 [uml-devel] uml_net zombie processes Thomas Meyer
2015-07-13 13:52 ` Richard Weinberger
2015-07-13 13:58   ` Thomas Meyer
2015-07-13 14:00     ` Richard Weinberger
2015-07-13 14:24       ` Thomas Meyer
2015-07-13 14:41         ` Richard Weinberger
2015-07-13 15:08           ` Thomas Meyer
2015-07-13 15:11             ` Richard Weinberger
2015-07-13 15:12               ` Thomas Meyer
2015-07-15 10:12                 ` Richard Weinberger
2015-07-15 13:58                   ` Thomas Meyer
2015-08-09 17:57                     ` Richard Weinberger
2015-08-09 18:22                       ` Thomas Meyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.