Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Dec 2006 15:18:02 +0000
From:      Deomid Ryabkov <myself@rojer.pp.ru>
To:        Gonzalo Arana <gonzalo.arana@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: net/mpd causes a kernel freeze
Message-ID:  <458FEBAA.7020104@rojer.pp.ru>
In-Reply-To: <ca81c4b60611060708t4cace523o8b9274c1e4a90f65@mail.gmail.com>
References:  <ca81c4b60611060708t4cace523o8b9274c1e4a90f65@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Gonzalo Arana wrote:
> Hi,
> 
> When I open a pptp tunnel with net/mpd, my PC freezes (numlock stops
> responding, for instance).

exactly. a complete freeze, not even being able to break into DDB (i.e. even ctrl-alt-esc stops working)

> 
> I am using 6.1-RELEASE with GENERIC kernel.  I've recompiled removing
> USB, SCSI/RAID controllers, with the same result.

also occurs on -CURRENT as of Nov 4.

> The freeze occurs right after the tunnel is up.

actually, it's after the first packet is sent. i.e., i can have tunnel up as long as i want,
but as soon as a packet is sent down the route, the system freezes.

> Does anyone expierence the same problem?

yes. and i'm glad to report that i found a solution for at least my instance.
it turned out to be a config error.

so what happened was this. i created an entry for a new tunnel in my mpd.conf nad of course done that
by just copy-pasting the previous entry. ended up with these mysterious freezes.
because this happened on -CURRENT, i went through great pains to try it on something more -STABLE,
but to my complete astonishment it was all the same on -STABLE. and i positively knew that -STABLE
was previously able to handle a tunnel to this very same endpoint. now i knew something was not right.
my -CURRENT is vanilla GENERIC, so it already had WITNESS, INVARIANTS and DDB, but neither did i see any messages
on the console, nor could i break into debugger (i could, prior to the freeze, but not after).
so anyway, some fairly long time into the whole process, i just decided to start commenting my config line by line,
to maybe see if any particular option would trigger this freeze. and bingo, there it was:
i used _wrong_ up_script for this connection. i wrote the right one, but forgot to change the config line i copied from previous entry.
so yeh, it's 100% reproducible: wrong up_script - freeze, no up_script or the right one - no freeze.
so what's in the script? here it is in its entirety:

IF=$1

/sbin/route delete default
/sbin/route add 10.1.0.0/16 10.2.0.1
/sbin/route add default -iface $IF

that's it. now what is important here, is that the network and gateway in the second line are wrong for this network configuration.
in particular, 10.2.0.1 is not directly reachable.
it's worth noting that this configuration would hang the machine only if used for the very first time.
if used after the correct configuration, it would not make machine hang.
e.g., if i boot a machine, set up a tunnel with "up_script wrong_script.sh" and then ping an external host, the machine hangs.
however, if i boot, set up a tunnel with "up_script right_script.sh" (at this point the tunnel works as expected and external host is pingable),
then tear it down, replace "up_script right_script.sh" with "up_script wrong_script.sh", the machine does not hang and external host is not pingable (no route to host).

my guess is that this incorrect route somehow messes up routing table.

> 
> Here are the relevant configs:
> 
>> /usr/local/etc/mpd/mpd.conf:
>>
>> default:
>>         load vpn
>>
>> vpn:
>>         new -i ng0 vpn vpn
>>         set iface disable on-demand
>>         set iface idle 0
>> # disconnect the client after 8 hours
>>         set iface session 28800
>>         #set iface route 192.168.2.0/24
>>         set bundle disable multilink
>>         set bundle authname my_username
>>         set bundle password my_password
>>         set link yes acfcomp protocomp
>>         set link no pap chap
>>         set link accept pap
>>         set link mtu 1460
>> # If remote machine is NT you need this..
>> #       set link enable no-orig-auth
>>         set link keep-alive 10 75
>>         set ipcp no vjcomp
>>
>> /usr/local/etc/mpd/mpd.links:
>> vpn:
>>         set link type pptp
>>         set pptp self ZZZ
>>         set pptp peer YYY
>>         set pptp enable originate incoming outcall
>>         set pptp disable windowing
>>
>>
>> where:
>>    ZZZ my ethernet IP address
>>    YYY ip address of TCP peer
>>
> 
> Thank you very much in advance,
> 



-- 
Deomid Ryabkov aka Rojer
myself@rojer.pp.ru
rojer@sysadmins.ru
ICQ: 8025844

[-- Attachment #2 --]
0	*H
010	+0	*H
	=00b;^`@3[m0
	*H
0b10	UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA0
060401182654Z
070401182654Z0_10URyabkov10
U*Deomid10UDeomid Ryabkov1!0	*H
	myself@rojer.pp.ru0"0
	*H
0
sQIk\c!yX݋6.ܧѧcAƖ
THQX>TMrhL2#UK,Uv [CLGsk/=eopy|?aNx*;9;8S06"'+ePzNt;Ȋ.*'Ɔkc$!YuDW27˦UxPT+–g|*%qe͸=T_-%ΈY/0-0U0myself@rojer.pp.ru0U00
	*H
&7fd·%3WĭcpƐp++N}qfPT0[5IXe3A9Gv_*zYvv;bɢ@`E6&2Rߙ00b;^`@3[m0
	*H
0b10	UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA0
060401182654Z
070401182654Z0_10URyabkov10
U*Deomid10UDeomid Ryabkov1!0	*H
	myself@rojer.pp.ru0"0
	*H
0
sQIk\c!yX݋6.ܧѧcAƖ
THQX>TMrhL2#UK,Uv [CLGsk/=eopy|?aNx*;9;8S06"'+ePzNt;Ȋ.*'Ɔkc$!YuDW27˦UxPT+–g|*%qe͸=T_-%ΈY/0-0U0myself@rojer.pp.ru0U00
	*H
&7fd·%3WĭcpƐp++N}qfPT0[5IXe3A9Gv_*zYvv;bɢ@`E6&2Rߙ0?0
0
	*H
010	UZA10UWestern Cape10U	Cape Town10U
Thawte Consulting1(0&UCertification Services Division1$0"UThawte Personal Freemail CA1+0)	*H
	personal-freemail@thawte.com0
030717000000Z
130716235959Z0b10	UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA00
	*H
0Ħ<UsUNʙZhup[v:aQP
0cZ,p+Z?qV˯<6$*+w=+>@dקe*TH<a@dr`00U00CU<0:08642http://crl.thawte.com/ThawtePersonalFreemailCA.crl0U0)U"0 010UPrivateLabel2-1380
	*H
HP.
fgCL!6-6/P p<ab:~t%Pb'qW%ݩ9 Oe_N4[5MwV!x!5$F]_eO1d0`0v0b10	UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA;^`@3[m0	+0	*H
	1	*H
0	*H
	1
061225151802Z0#	*H
	1OE%G?ob
-nϏH0R	*H
	1E0C0
*H
0*H
0
*H
@0+0
*H
(0	+71x0v0b10	UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA;^`@3[m0*H
	1xv0b10	UZA1%0#U
Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA;^`@3[m0
	*H
aԓ?6L|AQe>ށ{=IJz_=7Qi]7qυ:t0ü<CuWCh@nC`bQ)h5i/SzR3mE$%oa5Ng9RW@AB*[~/ہo9E%,G%?;nЙ]l %xAᆂ
TËs:[g
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?458FEBAA.7020104>