fam
[Top] [All Lists]

Fam 2.7.0 crashing on FreeBSD/NFS

To: fam@xxxxxxxxxxx
Subject: Fam 2.7.0 crashing on FreeBSD/NFS
From: Ulrich Spoerlein <q@xxxxxx>
Date: Thu, 18 Dec 2003 16:32:36 +0100
Sender: fam-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.5.1i
Hi there,

the current version of FAM in the FreeBSD Ports is 2.6.9. This version
crashes for me, when used over NFS. I now updated the version to 2.7.0
to see if the Problem vanished but it's still broken.

Here is a link to the PR (with backtrace) I filed about 2.6.9:
http://www.freebsd.org/cgi/query-pr.cgi?pr=55219

And this is the situation with 2.7.0:
(gdb) r -f -d -v
Starting program: /usr/local/sbin/famd -f -d -v
famd[32741]: log level is LOG_DEBUG
famd[32741]: log level is LOG_INFO
famd[32741]: Shutting down connection
Assertion failed: (filename[0] == '/'), function InternalClient, file 
InternalClient.c++, line 38.

Program received signal SIGABRT, Aborted.
0x281b8d4f in kill () from /lib/libc.so.5
(gdb) bt
#0  0x281b8d4f in kill () from /lib/libc.so.5                                   
                                                  
#1  0x281ad7f8 in raise () from /lib/libc.so.5                                  
                                                  
#2  0x28225eb2 in abort () from /lib/libc.so.5                                  
                                                  
#3  0x281fc36f in __assert () from /lib/libc.so.5                               
                                                  
#4  0x08051c5a in InternalClient (this=0x806d3e0, filename=0x8062980 "dummy",   
                                                  
    h=0x8050120 <FileSystemTable::mtab_event_handler(Event const&, void*)>, 
closr=0x0)
    at InternalClient.c++:38
#5  0x080501e6 in FileSystemTable::find(char const*, Cred const&) (             
                                                  
    path=0xbfbfe330 "/usr/home/q/.kde/share/servicetypes", cr=@0xbfbfe310)
    at FileSystemTable.c++:258
#6  0x0804a57d in ClientInterest (this=0x8071300,                               
                                                  
    name=0xbfbfe330 "/usr/home/q/.kde/share/servicetypes", c=0x8072000, r=1, 
cr=@0xbfbfe310,
    type=DIRECTORY) at ClientInterest.c++:38
#7  0x0804c88c in Directory (this=0x8071300,                                    
                                                  
    name=0xbfbfe330 "/usr/home/q/.kde/share/servicetypes", c=0x8072000, r=1, 
cr=@0xbfbfe310)
    at Directory.c++:46
#8  0x080555d8 in MxClient::monitor_dir(int, char const*, Cred const&) 
(this=0x8072000, request=1,                                
    path=0xbfbfe330 "/usr/home/q/.kde/share/servicetypes", cred=@0xbfbfe310) at 
MxClient.c++:92
#9  0x0805f984 in TCP_Client::input_msg(char const*, int) (this=0x8072000,      
                                                  
    msg=0x8072042 "M1 1000 0 /usr/home/q/.kde/share/servicetypes\n", size=81) 
at TCP_Client.c++:198
#10 0x0805f4af in TCP_Client::input_handler(char const*, unsigned, void*) (     
                                                  
    msg=0x8072042 "M1 1000 0 /usr/home/q/.kde/share/servicetypes\n", nbytes=81, 
closure=0x8072000)
    at TCP_Client.c++:69
#11 0x0804a423 in ClientConnection::input_msg(char const*, unsigned) 
(this=0x807202c,                                             
    msg=0x8072042 "M1 1000 0 /usr/home/q/.kde/share/servicetypes\n", nbytes=81)
    at ClientConnection.c++:40
#12 0x08057fa3 in NetConnection::deliver_input() (this=0x807202c) at 
NetConnection.c++:170                                        
#13 0x08057ecd in NetConnection::input() (this=0x807202c) at 
NetConnection.c++:144                                                
#14 0x08057dd7 in NetConnection::read_handler(int, void*) (fd=6, 
closure=0x807202c)                                               
---Type <return> to continue, or q <return> to quit---
    at NetConnection.c++:114
#15 0x0805c632 in Scheduler::handle_io(fd_set const*, 
Scheduler::FDInfo::FDIOHandler Scheduler::FDInfo::*) (fds=0xbfbfe8e0,       
+iotype=&FDInfo::read) at Scheduler.c++:315                                     
                                                  
#16 0x0805c70c in Scheduler::select() () at Scheduler.c++:343                   
                                                  
#17 0x08060d59 in Scheduler::loop() () at Scheduler.h:89                        
                                                  
#18 0x08060627 in main (argc=4, argv=0xbfbfea64) at main.c++:290                
                                                  
#19 0x08049e92 in _start ()                                                     
                                                  
(gdb) f 4
#4  0x08051c5a in InternalClient (this=0x806d3e0, filename=0x8062980 "dummy",   
                                                  
    h=0x8050120 <FileSystemTable::mtab_event_handler(Event const&, void*)>, 
closr=0x0)
    at InternalClient.c++:38
38          assert(filename[0] == '/');
(gdb) l
33                                     EventHandler h, void *closr)
34          : Client("myself", LOCALHOST()), handler(h), closure(closr)
35      {
36          assert(filename);
37          assert(h);
38          assert(filename[0] == '/');
39          Log::debug("%s watching %s", name(), filename);
40          interest = new File(filename, this, Request(0), Cred::SuperUser);
41      }
42
(gdb) p filename
$1 = 0x8062980 "dummy"
(gdb) l 30
25      #include <assert.h>
26
27      #include "Directory.h"
28      #include "Event.h"
29      #include "File.h"
30      #include "Log.h"
31
32      InternalClient::InternalClient(const char *filename,
33                                     EventHandler h, void *closr)
34          : Client("myself", LOCALHOST()), handler(h), closure(closr)
(gdb) p h
$2 = (void (*)(const Event &,
    void *)) 0x8050120 <FileSystemTable::mtab_event_handler(Event const&, 
void*)>
(gdb) p closr
$3 = (void *) 0x0
(gdb) f 5
#5  0x080501e6 in FileSystemTable::find(char const*, Cred const&) (             
                                                  
    path=0xbfbfe330 "/usr/home/q/.kde/share/servicetypes", cr=@0xbfbfe310)
    at FileSystemTable.c++:258
258             mtab_watcher = new InternalClient(mtab_name, 
mtab_event_handler, NULL);
(gdb) l
253
254         //  (Initialize fs_by_name if necessary.) As a side effect,
255         //  create_fs_by_name initializes our "root" member variable.
256         if (!fs_by_name)
257         {   create_fs_by_name();
258             mtab_watcher = new InternalClient(mtab_name, 
mtab_event_handler, NULL);
259         }
260
261         cr.become_user();
262
(gdb) l 250
245
246     FileSystem *
247     FileSystemTable::find(const char *path, const Cred& cr)
248     {
249         char temp_path[PATH_MAX];
250         FileSystem *fs = NULL;
251
252         assert(path[0] == '/');
253
254         //  (Initialize fs_by_name if necessary.) As a side effect,
(gdb) p path
$4 = 0xbfbfe330 "/usr/home/q/.kde/share/servicetypes"
(gdb)

At Frame 5, the path is still valid, at Frame 4 it somehow becomes
'dummy'. How can that be?

Running famd with '-L' which should disable NFS, fails at the same
assertion.

Any hints on how to debug this further? Thanks!

Ulrich Spörlein
-- 
PGP Key ID: F0DB9F44                            Get it while it's hot!
PGP Fingerprint: F1CE D062 0CA9 ADE3 349B  2FE8 980A C6B5 F0DB 9F44
I abhor a system designed for the "user", if that word is a coded
pejorative meaning "stupid and unsophisticated".        -- Ken Thompson


<Prev in Thread] Current Thread [Next in Thread>