LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

is it possible that struct ip_vs_service *svc is not filled up?

To: Wensong Zhang <wensong@xxxxxxxxxxxx>, Julian Anastasov <uli@xxxxxxxxxxxxxxxxxxxxxx>
Subject: is it possible that struct ip_vs_service *svc is not filled up?
Cc: "lvs-users@xxxxxxxxxxxxxxxxxxxxxx" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
From: Ratz <ratz@xxxxxx>
Date: Sun, 06 Aug 2000 19:41:01 +0200
Hi,

I've got a some weird problems and I've been chasing
them for quite some time. I know I have done something 
stupid while testing like hell but I can't really 
figure it out.

And I still get oops from time to time but I think
this has nothing to do with the lvs-patch.

And I attached a small beautifier patch:

   - I think the #ifdef / #endif is not needed anymore.
   - corrected little typo I saw while reading the code.

regards,
Roberto Nibali, ratz


-- 
mailto: `echo NrOatSz@xxxxxxxxx | sed 's/[NOSPAM]//g'`
lb:/root # ipvsadm -h
ipvsadm v1.11 2000/06/16 (compiled with getopt_long and IPVS v0.9.15)

-----------------------------------------------------
Testmachine, outside of lvs-cluster.
|-($:~)-- telnet 192.168.100.100 80
Trying 192.168.100.100...
telnet: connect to address 192.168.100.100: Connection refused
|-($:~)-- telnet 192.168.100.101 80
Trying 192.168.100.101...
telnet: connect to address 192.168.100.101: Connection refused
|-($:~)-- telnet 192.168.100.102 80
Trying 192.168.100.102...
telnet: connect to address 192.168.100.102: Connection refused
|-($:~)-- telnet 192.168.100.100 80
Trying 192.168.100.100...
telnet: connect to address 192.168.100.100: Connection refused
|-($:~)-- 
-----------------------------------------------------

Aug  6 18:54:11 lb kernel: IPVS: ip_vs_sched_getbyname(): sched_name "wrr"
Aug  6 18:54:11 lb kernel: IPVS: ip_vs_sched_getbyname(): sched_name "wlc"
Aug  6 18:54:11 lb kernel: IPVS: ip_vs_sched_getbyname(): sched_name "wlc"
Aug  6 18:54:11 lb kernel: IPVS: lookup_service fwm 0 6 0264A8C0:5604 not hit
Aug  6 18:54:11 lb last message repeated 3 times
Aug  6 18:54:11 lb kernel: IPVS: lookup_service fwm 0 6 0264A8C0:5704 not hit
Aug  6 18:54:11 lb last message repeated 2 times
Aug  6 18:54:11 lb kernel: IPVS: enter ip_vs_add_dest()
Aug  6 18:54:11 lb kernel: IPVS: enter ip_vs_new_dest()
Aug  6 18:54:11 lb kernel: IPVS: leave ip_vs_new_dest()
Aug  6 18:54:11 lb kernel: IPVS: lookup_service fwm 0 6 0A0217AC:1600 not hit
Aug  6 18:54:11 lb kernel: IPVS: lookup_service fwm 0 6 0264A8C0:5804 not hit
Aug  6 18:54:11 lb last message repeated 3 times
Aug  6 18:54:11 lb kernel: IPVS: lookup_service fwm 0 6 0264A8C0:5904 not hit
Aug  6 18:54:11 lb last message repeated 2 times
Aug  6 18:54:11 lb kernel: IPVS: enter ip_vs_add_dest()
Aug  6 18:54:11 lb kernel: IPVS: enter ip_vs_new_dest()
Aug  6 18:54:11 lb kernel: IPVS: leave ip_vs_new_dest()
Aug  6 18:54:11 lb kernel: IPVS: lookup_service fwm 0 6 0A0217AC:1600 not hit
Aug  6 18:54:11 lb kernel: IPVS: lookup_service fwm 0 6 0264A8C0:5A04 not hit
Aug  6 18:54:11 lb last message repeated 3 times
Aug  6 18:54:11 lb kernel: IPVS: enter ip_vs_add_dest()
Aug  6 18:54:11 lb kernel: IPVS: enter ip_vs_new_dest()
Aug  6 18:54:11 lb kernel: IPVS: leave ip_vs_new_dest()
Aug  6 18:54:11 lb kernel: IPVS: lookup_service fwm 0 6 0264A8C0:5B04 not hit
Aug  6 18:54:11 lb last message repeated 3 times
Aug  6 18:54:11 lb kernel: IPVS: enter ip_vs_add_dest()
Aug  6 18:54:11 lb kernel: IPVS: enter ip_vs_new_dest()
Aug  6 18:54:11 lb kernel: IPVS: leave ip_vs_new_dest()
Aug  6 18:54:12 lb kernel: IPVS: lookup_service fwm 0 6 0A0217AC:1600 not hit
Aug  6 18:54:17 lb last message repeated 7 times
...
Aug  6 18:54:18 lb kernel: IPVS: lookup_service fwm 0 6 0A0217AC:1600 not hit
Aug  6 18:54:20 lb last message repeated 4 times
Aug  6 18:54:21 lb kernel: IPVS: lookup_service fwm 0 6 6564A8C0:5000 hit
Aug  6 18:54:21 lb kernel: IPVS: look/in 6 1E0217AC:8505->6564A8C0:5000 not hit
Aug  6 18:54:21 lb kernel: IPVS: ip_vs_wlc_schedule(): Scheduling...
Aug  6 18:54:21 lb kernel: IPVS: Schedule: no dest found.
Aug  6 18:54:21 lb kernel: IPVS: lookup_service fwm 0 6 0A0217AC:1600 not hit
Aug  6 18:54:23 lb last message repeated 4 times
Aug  6 18:54:24 lb kernel: IPVS: lookup_service fwm 0 6 0264A8C0:6804 not hit
Aug  6 18:54:24 lb last message repeated 3 times
...
Aug  6 18:54:30 lb kernel: IPVS: lookup_service fwm 0 6 0264A8C0:7604 not hit
Aug  6 18:54:30 lb last message repeated 3 times
Aug  6 18:54:30 lb kernel: IPVS: lookup_service fwm 0 6 0A0217AC:1600 not hit
Aug  6 18:54:31 lb kernel: IPVS: lookup_service fwm 0 6 0A0217AC:1600 not hit
Aug  6 18:54:31 lb kernel: IPVS: lookup_service fwm 0 6 6664A8C0:5000 hit
Aug  6 18:54:31 lb kernel: IPVS: look/in 6 1E0217AC:8605->6664A8C0:5000 not hit
Aug  6 18:54:31 lb kernel: IPVS: P-schedule: src AC17021E:0586 dest 
C0A86466:0050 mnet AC17021E
Aug  6 18:54:31 lb kernel: IPVS: look/in 6 1E0217AC:0000->6664A8C0:5000 not hit
Aug  6 18:54:31 lb kernel: IPVS: ip_vs_wlc_schedule(): Scheduling...
Aug  6 18:54:31 lb kernel: IPVS: P-schedule: no dest found.
Aug  6 18:54:31 lb kernel: IPVS: lookup_service fwm 0 6 0A0217AC:1600 not hit
Aug  6 18:54:36 lb last message repeated 6 times
Aug  6 18:54:36 lb kernel: IPVS: lookup_service fwm 0 6 0264A8C0:7A04 not hit
...
Aug  6 18:54:43 lb last message repeated 3 times
Aug  6 18:54:44 lb kernel: IPVS: lookup_service fwm 0 6 6464A8C0:5000 hit
Aug  6 18:54:44 lb kernel: IPVS: look/in 6 1E0217AC:8705->6464A8C0:5000 not hit
Aug  6 18:54:44 lb kernel: IPVS: P-schedule: src AC17021E:0587 dest 
C0A86464:0050 mnet AC17021E
Aug  6 18:54:44 lb kernel: IPVS: look/in 6 1E0217AC:0000->6464A8C0:5000 not hit
Aug  6 18:54:44 lb kernel: IPVS: ip_vs_wrr_schedule(): Scheduling...
Aug  6 18:54:44 lb kernel: IPVS: ip_vs_wrr_schedule(): no available servers
Aug  6 18:54:44 lb kernel: IPVS: P-schedule: no dest found.
Aug  6 18:54:44 lb kernel: IPVS: lookup_service fwm 0 6 0A0217AC:1600 not hit
Aug  6 18:54:49 lb last message repeated 6 times
Aug  6 18:54:49 lb kernel: IPVS: lookup_service fwm 0 6 0264A8C0:8C04 not hit
Aug  6 18:54:49 lb last message repeated 3 times
...

IP Virtual Server version 0.9.15 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port          Forward Weight ActiveConn InActConn
TCP  192.168.100.102:80 wlc persistent 90
  -> 192.168.100.14:80           Route   0      0          0
  -> 192.168.100.13:80           Route   0      0          0
TCP  192.168.100.100:80 wrr persistent 90
  -> 192.168.100.11:80           Route   0      0          0
  -> 192.168.100.10:80           Route   0      0          0
TCP  192.168.100.101:80 wlc

IP Virtual Server version 0.9.15 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP  C0A86466:0050 wlc persistent 9000 FFFFFFFF
  -> C0A8640E:0050      Route   0      0          0         
  -> C0A8640D:0050      Route   0      0          0         
TCP  C0A86464:0050 wrr persistent 9000 FFFFFFFF
  -> C0A8640B:0050      Route   0      0          0         
  -> C0A8640A:0050      Route   0      0          0         
TCP  C0A86465:0050 wlc

Jul 27 16:51:32 lb kernel: Unable to handle kernel NULL pointer dereference at 
virtual address 0000000d
Jul 27 16:51:32 lb kernel: current->tss.cr3 = 03017000, %cr3 = 03017000
Jul 27 16:51:32 lb kernel: *pde = 00000000
Jul 27 16:51:32 lb kernel: Oops: 0000
Jul 27 16:51:32 lb kernel: CPU:    0
Jul 27 16:51:32 lb kernel: EIP:    0010:[ipfw_output_check+73/100]
Jul 27 16:51:32 lb kernel: EFLAGS: 00010202
Jul 27 16:51:32 lb kernel: eax: 00000001   ebx: c01d372c   ecx: c33d206c   edx: 
c33a3ca0
Jul 27 16:51:32 lb kernel: esi: 00000002   edi: 00000008   ebp: c3009e18   esp: 
c3009da8
Jul 27 16:51:32 lb kernel: ds: 0018   es: 0018   ss: 0018
Jul 27 16:51:32 lb kernel: Process sshd (pid: 588, process nr: 22, 
stackpage=c3009000)
Jul 27 16:51:32 lb kernel: Stack: 00000000 c0144563 c01d372c 00000002 c01d80e0 
c33d206c 00000000 c3009e18 
Jul 27 16:51:32 lb kernel:        c33d206c c32b2c40 c3009e18 c3009e10 c0155ed8 
00000002 c01d80e0 c33d206c 
Jul 27 16:51:32 lb kernel:        00000000 c3009e18 c33d20a0 c33d2080 c33a3ca0 
c01d80e0 c33d20a0 c33d2080 
Jul 27 16:51:32 lb kernel: Call Trace: [call_out_firewall+55/80] 
[ip_queue_xmit+440/936] [tcp_transmit_skb+977/988] [skb_clone+24/148] 
[tcp_write_xmit+407/472] [tcp_do_sendmsg+2050/2128] [inet_sendmsg+0/144] 
Jul 27 16:51:32 lb kernel:        [handle_IRQ_event+4/108] 
[tcp_v4_sendmsg+92/104] [inet_sendmsg+131/144] [sock_sendmsg+136/172] 
[inet_sendmsg+0/144] [sock_write+146/156] [sys_write+219/256] 
[sock_write+0/156] 
Jul 27 16:51:32 lb kernel:        [system_call+52/56] 
Jul 27 16:51:32 lb kernel: Code: 8b 40 0c 50 8b 44 24 24 50 8b 44 24 20 8b 00 
50 51 e8 05 ed 

and piped through ksymoops:

No modules in ksyms, skipping objects
Jul 27 16:51:32 lb kernel: Unable to handle kernel NULL pointer dereference at 
virtual address 0000000d
Jul 27 16:51:32 lb kernel: current->tss.cr3 = 03017000, %cr3 = 03017000
Jul 27 16:51:32 lb kernel: *pde = 00000000
Jul 27 16:51:32 lb kernel: Oops: 0000
Jul 27 16:51:32 lb kernel: CPU:    0
Jul 27 16:51:32 lb kernel: EIP:    0010:[ipfw_output_check+73/100]
Jul 27 16:51:32 lb kernel: EFLAGS: 00010202
Jul 27 16:51:32 lb kernel: eax: 00000001   ebx: c01d372c   ecx: c33d206c   edx: 
c33a3ca0
Jul 27 16:51:32 lb kernel: esi: 00000002   edi: 00000008   ebp: c3009e18   esp: 
c3009da8
Jul 27 16:51:32 lb kernel: ds: 0018   es: 0018   ss: 0018
Jul 27 16:51:32 lb kernel: Process sshd (pid: 588, process nr: 22, 
stackpage=c3009000)
Jul 27 16:51:32 lb kernel: Stack: 00000000 c0144563 c01d372c 00000002 c01d80e0 
c33d206c 00000000 c3009e18 
Jul 27 16:51:32 lb kernel:        c33d206c c32b2c40 c3009e18 c3009e10 c0155ed8 
00000002 c01d80e0 c33d206c 
Jul 27 16:51:32 lb kernel:        00000000 c3009e18 c33d20a0 c33d2080 c33a3ca0 
c01d80e0 c33d20a0 c33d2080 
Jul 27 16:51:32 lb kernel: Call Trace: [call_out_firewall+55/80] 
[ip_queue_xmit+440/936] [tcp_transmit_skb+977/988] [skb_clone+24/148] 
[tcp_write_xmit+407/472] [tcp_do_sendmsg+2050/2128] [inet_sendmsg+0/144] 
Jul 27 16:51:32 lb kernel: Code: 8b 40 0c 50 8b 44 24 24 50 8b 44 24 20 8b 00 
50 51 e8 05 ed 

Code:  00000000 Before first symbol            00000000 <_IP>: <===
Code:  00000000 Before first symbol               0:    8b 40 0c                
movl   0xc(%eax),%eax <===
Code:  00000003 Before first symbol               3:    50                      
pushl  %eax
Code:  00000004 Before first symbol               4:    8b 44 24 24             
movl   0x24(%esp,1),%eax
Code:  00000008 Before first symbol               8:    50                      
pushl  %eax
Code:  00000009 Before first symbol               9:    8b 44 24 20             
movl   0x20(%esp,1),%eax
Code:  0000000d Before first symbol               d:    8b 00                   
movl   (%eax),%eax
Code:  0000000f Before first symbol               f:    50                      
pushl  %eax
Code:  00000010 Before first symbol              10:    51                      
pushl  %ecx
Code:  00000011 Before first symbol              11:    e8 05 ed 00 00          
call    0000ed1b Before first symbol

and another one(this one shows that it is not lvs oopsing):

No modules in ksyms, skipping objects
3c59x.c:v0.99H 27May00 Donald Becker 
http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html
Unable to handle kernel NULL pointer dereference at virtual address 0000000d
current->tss.cr3 = 03017000, %cr3 = 03017000
*pde = 00000000
Oops: 0000
CPU:    0
EIP:    0010:[<c016b009>]
EFLAGS: 00010202
eax: 00000001   ebx: c01d372c   ecx: c33d206c   edx: c33a3ca0
esi: 00000002   edi: 00000008   ebp: c3009e18   esp: c3009da8
ds: 0018   es: 0018   ss: 0018
Process sshd (pid: 588, process nr: 22, stackpage=c3009000)
Stack: 00000000 c0144563 c01d372c 00000002 c01d80e0 c33d206c 00000000 c3009e18 
       c33d206c c32b2c40 c3009e18 c3009e10 c0155ed8 00000002 c01d80e0 c33d206c 
       00000000 c3009e18 c33d20a0 c33d2080 c33a3ca0 c01d80e0 c33d20a0 c33d2080 
Call Trace: [<c0144563>] [<c0155ed8>] [<c015c85d>] [<c01453d4>] [<c015cd43>] 
[<c0158b1a>] [<c01669d8>] 
       [<c010a018>] [<c015f388>] [<c0166a5b>] [<c0142fa8>] [<c01669d8>] 
[<c01431b6>] [<c01240b3>] [<c0143124>] 
       [<c0108fc8>] 
Code: 8b 40 0c 50 8b 44 24 24 50 8b 44 24 20 8b 00 50 51 e8 05 ed 

>>EIP: c016b009 <ipfw_output_check+49/64>
Trace: c0144563 <call_out_firewall+37/50>
Trace: c0155ed8 <ip_queue_xmit+1b8/3a8>
Trace: c015c85d <tcp_transmit_skb+3d1/3dc>
Trace: c01453d4 <skb_clone+18/94>
Trace: c015cd43 <tcp_write_xmit+197/1d8>
Trace: c0158b1a <tcp_do_sendmsg+802/850>
Trace: c01669d8 <inet_sendmsg+0/90>
Trace: c010a018 <handle_IRQ_event+4/6c>
Trace: c0108fc8 <system_call+34/38>
Code:  c016b009 <ipfw_output_check+49/64>      00000000 <_EIP>: <===
Code:  c016b009 <ipfw_output_check+49/64>         0:    8b 40 0c                
movl   0xc(%eax),%eax <===
ode:  c016b00c <ipfw_output_check+4c/64>         3:     50                      
pushl  %eax
Code:  c016b00d <ipfw_output_check+4d/64>         4:    8b 44 24 24             
movl   0x24(%esp,1),%eax
Code:  c016b011 <ipfw_output_check+51/64>         8:    50                      
pushl  %eax
Code:  c016b012 <ipfw_output_check+52/64>         9:    8b 44 24 20             
movl   0x20(%esp,1),%eax
Code:  c016b016 <ipfw_output_check+56/64>         d:    8b 00                   
movl   (%eax),%eax
Code:  c016b018 <ipfw_output_check+58/64>         f:    50                      
pushl  %eax
Code:  c016b019 <ipfw_output_check+59/64>        10:    51                      
pushl  %ecx
Code:  c016b01a <ipfw_output_check+5a/64>        11:    e8 05 ed 00 00          
call    c0179d24 <poll_drive+28/84>



--- ip_vs_old.c Sun Aug  6 19:35:06 2000
+++ ip_vs.c     Sun Aug  6 19:34:08 2000
@@ -1059,14 +1059,12 @@
                 }
         }
         
-#ifdef CONFIG_IP_VS_DEBUG
         if (svc == NULL)
                 IP_VS_DBG("lookup_service fwm %d %d %08X:%04X not hit\n",
                           fwmark, protocol, vaddr, vport);
         else
                 IP_VS_DBG("lookup_service fwm %d %d %08X:%04X hit\n",
                           fwmark, protocol, vaddr, vport);
-#endif
         
         read_unlock(&__ip_vs_lock);
         return svc; 
@@ -2160,7 +2158,7 @@
 
 /*
  *  Pass or drop the packet.
- *  Called by ip_fw_demasquerade, when the virtual service is avaiable but
+ *  Called by ip_fw_demasquerade, when the virtual service is available but
  *  no destination is available for a new connection.
  */
 int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb)
<Prev in Thread] Current Thread [Next in Thread>