Mailing List Archive

[lvs-users] LVS kernel panic
Hello.

I have installed ipvsadm (1.2.1) on Linux Ubuntu-14.04 (3.13.0-55-generic) server.
Next I create service: ipvsadm -A -t 172.16.0.12:http -s lblc.
When I tried edit created service I got kernel panic. Edit command: ipvsadm -A -t 172.16.0.12:http -s rr, for example.
The problem is repeatable, I try in VirtualBox.

Screenshot: https://www.dropbox.com/s/1try3sxdtfdxg9o/%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%20%D0%BE%D1%82%202015-06-18%2014%3A45%3A04.png?dl=0

Can anyone help me?
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] LVS kernel panic [ In reply to ]
Hello,

On Thu, 18 Jun 2015, Alexander Vasiliev wrote:

> Hello.
>
> I have installed ipvsadm (1.2.1) on Linux Ubuntu-14.04 (3.13.0-55-generic) server.
> Next I create service: ipvsadm -A -t 172.16.0.12:http -s lblc.
> When I tried edit created service I got kernel panic. Edit command: ipvsadm -A -t 172.16.0.12:http -s rr, for example.
> The problem is repeatable, I try in VirtualBox.

You mean second command is -E, not -A, right?
It looks like I completely messed the scheduler editing
with commit ceec4c381681 ("ipvs: convert services to rcu").
The problem is with the svc->sched_data. I forgot about it.
The reverse order of ip_vs_bind_scheduler and
ip_vs_unbind_scheduler causes problem in all cases
for schedulers that maintain sched_data.
And RCU readers are not guaranteed to get the
scheduler+sched_data pointers safely for same scheduler.

The simple fix would be to make sure
ip_vs_unbind_scheduler and ip_vs_bind_scheduler work
in this order but with synchronize_rcu between them.
Something like what was before this change.
The individual schedulers will not be touched.
As changing of scheduler is a rare operation it can
be the initial bugfix. If we want to fix it without
such delay we have to change all schedulers, may be
by moving sched_data in some new struct scheduler_context
where schedulers can store their sched_data. Then
svc->sched_context (RCU ptr) can contain both the
scheduler and the sched_data pointers.

Regards

--
Julian Anastasov <ja@ssi.bg>

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] LVS kernel panic [ In reply to ]
Hi.
Thanks, for answer. I will use -D ==> -A for edit services.

> On Jun 18, 2015, at 9:52 PM, Julian Anastasov <ja@ssi.bg> wrote:
>
>
> Hello,
>
> On Thu, 18 Jun 2015, Alexander Vasiliev wrote:
>
>> Hello.
>>
>> I have installed ipvsadm (1.2.1) on Linux Ubuntu-14.04 (3.13.0-55-generic) server.
>> Next I create service: ipvsadm -A -t 172.16.0.12:http -s lblc.
>> When I tried edit created service I got kernel panic. Edit command: ipvsadm -A -t 172.16.0.12:http -s rr, for example.
>> The problem is repeatable, I try in VirtualBox.
>
> You mean second command is -E, not -A, right?
> It looks like I completely messed the scheduler editing
> with commit ceec4c381681 ("ipvs: convert services to rcu").
> The problem is with the svc->sched_data. I forgot about it.
> The reverse order of ip_vs_bind_scheduler and
> ip_vs_unbind_scheduler causes problem in all cases
> for schedulers that maintain sched_data.
> And RCU readers are not guaranteed to get the
> scheduler+sched_data pointers safely for same scheduler.
>
> The simple fix would be to make sure
> ip_vs_unbind_scheduler and ip_vs_bind_scheduler work
> in this order but with synchronize_rcu between them.
> Something like what was before this change.
> The individual schedulers will not be touched.
> As changing of scheduler is a rare operation it can
> be the initial bugfix. If we want to fix it without
> such delay we have to change all schedulers, may be
> by moving sched_data in some new struct scheduler_context
> where schedulers can store their sched_data. Then
> svc->sched_context (RCU ptr) can contain both the
> scheduler and the sched_data pointers.
>
> Regards
>
> --
> Julian Anastasov <ja@ssi.bg>


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users