Another showstopper in 2.2.5
Fredrik Ohrn
ohrn at chl.chalmers.se
Wed Aug 21 22:06:01 GMT 2002
On Wed, 21 Aug 2002 jra at dp.samba.org wrote:
> On Wed, Aug 21, 2002 at 07:40:04PM +0200, Fredrik Ohrn wrote:
> >
> > OK, I've tried it out and it didn't help.
> >
> > I removed my BlockSignals stuff and added ZERO_STRUCT(act) instead, now
> > the smbd dies on SIGPIPE just as before.
>
> Ok, we need to know when SIGPIPE is being removed from the blocked
> signal set on your system.
>
> Can you add some code in the main loop that prints out the current
> signal mask using this code:
>
> sigset_t blocked_mask = siggetmask();
> DEBUG(0,"SIGPIPE is %s\n", sigismember(&blocked_mask, SIGPIPE) ? "blocked" : "nonblocked" ));
>
> So we can see when the SIGPIPE is being removed from your
> masked set.
>
OK, I put this at the top of the while loop in smbd_process:
sigset_t dummy_mask, blocked_mask;
sigemptyset (&dummy_mask);
sigemptyset (&blocked_mask);
sigprocmask (SIG_BLOCK, &dummy_mask, &blocked_mask);
DEBUG (0, ("SIGPIPE is %s\n", sigismember (&blocked_mask, SIGPIPE) ? "blocked" : "nonblocked" ));
The signal gets unblocked right after I connect to the share.
Below is the log (at level 4), it got a bit large so I added some ** marks
at the SIGPIPE is blocked/nonblocked messages.
I'll go through the code tonight and add more debug messages to try to
pinpoint the exact place the signal is unmasked.
/Fredrik
...
...
[2002/08/22 08:29:49, 3, pid=8064] smbd/server.c:main(753)
loaded services
[2002/08/22 08:29:49, 3, pid=8064] smbd/server.c:main(768)
Becoming a daemon.
[2002/08/22 08:29:49, 3, pid=8065] lib/util_sock.c:open_socket_in(815)
bind succeeded on port 139
[2002/08/22 08:29:49, 2, pid=8065] smbd/server.c:open_sockets(215)
waiting for a connection
[2002/08/22 08:30:02, 3, pid=8078] smbd/oplock.c:init_oplocks(1211)
open_oplock_ipc: opening loopback UDP socket.
[2002/08/22 08:30:02, 3, pid=8078] lib/util_sock.c:open_socket_in(815)
bind succeeded on port 0
[2002/08/22 08:30:02, 3, pid=8078]
smbd/oplock_linux.c:linux_init_kernel_oplocks(299)
Linux kernel oplocks enabled
[2002/08/22 08:30:02, 3, pid=8078] smbd/oplock.c:init_oplocks(1241)
open_oplock ipc: pid = 8078, global_oplock_port = 4957
[2002/08/22 08:30:02, 4, pid=8078] lib/time.c:get_serverzone(114)
Serverzone is -7200
**[2002/08/22 08:30:02, 0, pid=8078] smbd/process.c:smbd_process(1264)
** SIGPIPE is blocked
[2002/08/22 08:30:02, 3, pid=8078] smbd/process.c:process_smb(877)
Transaction 0 of length 72
[2002/08/22 08:30:02, 2, pid=8078] smbd/reply.c:reply_special(91)
netbios connect: name1=FELINE name2=CANINE
[2002/08/22 08:30:02, 2, pid=8078] smbd/reply.c:reply_special(110)
netbios connect: local=feline remote=canine
**[2002/08/22 08:30:02, 0, pid=8078] smbd/process.c:smbd_process(1264)
** SIGPIPE is blocked
[2002/08/22 08:30:02, 3, pid=8078] smbd/process.c:process_smb(877)
Transaction 1 of length 137
[2002/08/22 08:30:02, 3, pid=8078] smbd/process.c:switch_message(684)
switch message SMBnegprot (pid 8078)
[2002/08/22 08:30:02, 3, pid=8078] smbd/sec_ctx.c:set_sec_ctx(313)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2002/08/22 08:30:02, 3, pid=8078] smbd/negprot.c:reply_negprot(342)
Requested protocol [PC NETWORK PROGRAM 1.0]
[2002/08/22 08:30:02, 3, pid=8078] smbd/negprot.c:reply_negprot(342)
Requested protocol [LANMAN1.0]
[2002/08/22 08:30:02, 3, pid=8078] smbd/negprot.c:reply_negprot(342)
Requested protocol [Windows for Workgroups 3.1a]
[2002/08/22 08:30:02, 3, pid=8078] smbd/negprot.c:reply_negprot(342)
Requested protocol [LM1.2X002]
[2002/08/22 08:30:02, 3, pid=8078] smbd/negprot.c:reply_negprot(342)
Requested protocol [LANMAN2.1]
[2002/08/22 08:30:02, 3, pid=8078] smbd/negprot.c:reply_negprot(342)
Requested protocol [NT LM 0.12]
[2002/08/22 08:30:02, 3, pid=8078] libsmb/namequery.c:resolve_lmhosts(768)
resolve_lmhosts: Attempting lmhosts lookup for name PDC<0x20>
[2002/08/22 08:30:02, 4, pid=8078] libsmb/namequery.c:startlmhosts(474)
startlmhosts: Can't open lmhosts file /usr/local/samba/lib/lmhosts. Error was No such file or directory
[2002/08/22 08:30:02, 3, pid=8078] libsmb/namequery.c:resolve_hosts(808)
resolve_hosts: Attempting host lookup for name PDC<0x20>
[2002/08/22 08:30:02, 3, pid=8078] lib/util_sock.c:open_socket_out(847)
Connecting to 129.16.214.4 at port 445
[2002/08/22 08:30:03, 2, pid=8078] lib/util_sock.c:open_socket_out(875)
error connecting to 129.16.214.4:445 (Connection refused)
[2002/08/22 08:30:03, 3, pid=8078] lib/util_sock.c:open_socket_out(847)
Connecting to 129.16.214.4 at port 139
[2002/08/22 08:30:03, 3, pid=8078] smbd/password.c:server_cryptkey(1045)
connected to password server PDC
[2002/08/22 08:30:03, 3, pid=8078] smbd/password.c:server_cryptkey(1062)
got session
[2002/08/22 08:30:03, 3, pid=8078] smbd/password.c:server_cryptkey(1077)
password server OK
[2002/08/22 08:30:03, 3, pid=8078] smbd/negprot.c:reply_nt1(179)
using password server validation
[2002/08/22 08:30:03, 3, pid=8078] smbd/negprot.c:reply_negprot(426)
Selected protocol NT LM 0.12
**[2002/08/22 08:30:03, 0, pid=8078] smbd/process.c:smbd_process(1264)
** SIGPIPE is blocked
[2002/08/22 08:30:03, 3, pid=8078] smbd/process.c:process_smb(877)
Transaction 2 of length 189
[2002/08/22 08:30:03, 3, pid=8078] smbd/process.c:switch_message(684)
switch message SMBsesssetupX (pid 8078)
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:set_sec_ctx(313)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2002/08/22 08:30:03, 3, pid=8078] smbd/reply.c:reply_sesssetup_and_X(857)
Domain=[CHL] NativeOS=[Windows 2002 2600] NativeLanMan=[Windows 2002 5.1]
[2002/08/22 08:30:03, 3, pid=8078] smbd/reply.c:reply_sesssetup_and_X(868)
sesssetupX:name=[ohrn]
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:push_sec_ctx(281)
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2002/08/22 08:30:03, 3, pid=8078] smbd/uid.c:push_conn_ctx(285)
push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:set_sec_ctx(313)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:get_current_groups(162)
get_current_groups: user is in 6 groups: 10, 100, 101, 500, 505, 25
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:pop_sec_ctx(420)
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:get_current_groups(162)
get_current_groups: user is in 6 groups: 10, 100, 101, 500, 505, 25
[2002/08/22 08:30:03, 3, pid=8078] smbd/password.c:register_vuid(336)
uid 407 registered to name ohrn
[2002/08/22 08:30:03, 3, pid=8078] smbd/password.c:register_vuid(338)
Clearing default real name
[2002/08/22 08:30:03, 3, pid=8078] smbd/password.c:register_vuid(340)
User name: ohrn Real name: Fredrik Ã<96>hrn
[2002/08/22 08:30:03, 3, pid=8078] smbd/process.c:chain_reply(1022)
Chained message
[2002/08/22 08:30:03, 3, pid=8078] smbd/process.c:switch_message(684)
switch message SMBtconX (pid 8078)
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:set_sec_ctx(313)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2002/08/22 08:30:03, 4, pid=8078] smbd/reply.c:reply_tcon_and_X(335)
Got device type ?????
[2002/08/22 08:30:03, 3, pid=8078] smbd/password.c:authorise_login(735)
authorise_login: ACCEPTED: validated uid ok as non-guest (user=ohrn)
[2002/08/22 08:30:03, 3, pid=8078] smbd/service.c:make_connection(478)
Forced group wheel
[2002/08/22 08:30:03, 3, pid=8078] smbd/service.c:make_connection(491)
Connect path is /disk2/test
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:push_sec_ctx(281)
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2002/08/22 08:30:03, 3, pid=8078] smbd/uid.c:push_conn_ctx(285)
push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:set_sec_ctx(313)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:get_current_groups(162)
get_current_groups: user is in 6 groups: 10, 100, 101, 500, 505, 25
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:pop_sec_ctx(420)
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:get_current_groups(162)
get_current_groups: user is in 6 groups: 10, 100, 101, 500, 505, 25
[2002/08/22 08:30:03, 4, pid=8078] rpc_server/srv_srvsvc_nt.c:get_share_security(211)
get_share_security: using default secdesc for test
[2002/08/22 08:30:03, 3, pid=8078] lib/util_seaccess.c:se_access_check(269)
se_access_check: user sid is S-1-5-21-576987964-3567525069-178134514-1814
[2002/08/22 08:30:03, 3, pid=8078] lib/util_seaccess.c:se_access_check(272)
se_access_check: also S-1-5-21-576987964-3567525069-178134514-1021
[2002/08/22 08:30:03, 3, pid=8078] lib/util_seaccess.c:se_access_check(272)
se_access_check: also S-1-5-21-576987964-3567525069-178134514-1201
[2002/08/22 08:30:03, 3, pid=8078] lib/util_seaccess.c:se_access_check(272)
se_access_check: also S-1-5-21-576987964-3567525069-178134514-1203
[2002/08/22 08:30:03, 3, pid=8078] lib/util_seaccess.c:se_access_check(272)
se_access_check: also S-1-5-21-576987964-3567525069-178134514-2001
[2002/08/22 08:30:03, 3, pid=8078] lib/util_seaccess.c:se_access_check(272)
se_access_check: also S-1-5-21-576987964-3567525069-178134514-2011
[2002/08/22 08:30:03, 3, pid=8078] lib/util_seaccess.c:se_access_check(272)
se_access_check: also S-1-5-21-576987964-3567525069-178134514-1051
[2002/08/22 08:30:03, 3, pid=8078] lib/util_seaccess.c:se_access_check(272)
se_access_check: also S-1-1-0
[2002/08/22 08:30:03, 3, pid=8078] lib/util_seaccess.c:se_access_check(272)
se_access_check: also S-1-5-2
[2002/08/22 08:30:03, 3, pid=8078] lib/util_seaccess.c:se_access_check(272)
se_access_check: also S-1-5-11
[2002/08/22 08:30:03, 3, pid=8078] smbd/vfs.c:vfs_init_default(122)
Initialising default vfs hooks
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:set_sec_ctx(313)
setting sec ctx (407, 10) - sec_ctx_stack_ndx = 0
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:set_sec_ctx(319)
6 user groups:
10 100 101 500 505 25
[2002/08/22 08:30:03, 3, pid=8078] smbd/vfs.c:vfs_ChDir(568)
vfs_ChDir to /disk2/test
[2002/08/22 08:30:03, 1, pid=8078] smbd/service.c:make_connection(651)
canine (129.16.214.84) connect to service test as user ohrn (uid=407, gid=10) (pid 8078)
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:set_sec_ctx(313)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2002/08/22 08:30:03, 3, pid=8078] smbd/reply.c:reply_tcon_and_X(395)
tconX service=test user=ohrn
**[2002/08/22 08:30:03, 0, pid=8078] smbd/process.c:smbd_process(1264)
** SIGPIPE is nonblocked
[2002/08/22 08:30:03, 3, pid=8078] smbd/process.c:process_smb(877)
Transaction 3 of length 157
[2002/08/22 08:30:03, 3, pid=8078] smbd/process.c:switch_message(684)
switch message SMBntcreateX (pid 8078)
[2002/08/22 08:30:03, 3, pid=8078] smbd/sec_ctx.c:set_sec_ctx(313)
setting sec ctx (407, 10) - sec_ctx_stack_ndx = 0
...
...
--
"It is easy to be blinded to the essential uselessness of computers by
the sense of accomplishment you get from getting them to work at all."
- Douglas Adams
Fredrik Öhrn Chalmers University of Technology
ohrn at chl.chalmers.se Sweden
More information about the samba-technical
mailing list