Bug 5512 - Panic with 3.2.0rc1 on Solaris10/ADDomainMember
Panic with 3.2.0rc1 on Solaris10/ADDomainMember
Status: REOPENED
Product: Samba 3.3
Classification: Unclassified
Component: File services
3.3.4
Sparc Solaris
: P3 major
: ---
Assigned To: Volker Lendecke
Samba QA Contact
:
: 5514 6951 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-02 05:17 UTC by Christoph Kaegi (mail account dead)
Modified: 2010-02-07 17:10 UTC (History)
3 users (show)

See Also:


Attachments
Full Backtrace (8.16 KB, text/plain)
2008-07-03 07:26 UTC, Christoph Kaegi (mail account dead)
no flags Details
patch (4.25 KB, patch)
2008-07-04 03:47 UTC, Volker Lendecke
no flags Details
Full Backtrace (6.58 KB, text/plain)
2008-07-07 07:16 UTC, Christoph Kaegi (mail account dead)
no flags Details
locking.c with the patch applied (39.52 KB, text/plain)
2008-07-07 07:28 UTC, Volker Lendecke
no flags Details
smbd 3.2.7 log level 10 on solaris 9 sparc (54.49 KB, application/octet-stream)
2009-01-13 04:01 UTC, Dietrich Streifert
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Kaegi (mail account dead) 2008-06-02 05:17:30 UTC
I can smbmount a testshare and display its
content, but when trying to access the files, Samba panics.

Get the Loglevel 10 smbd.log at 
https://home.zhaw.ch/~kaph/smbd.log

My initial Mail to the mailinglis is at http://marc.info/?t=121239449200001&r=1&w=2

Testparm output is:
---------------------------- 8< ----------------------------

mustang3# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[testshare]"
Loaded services file OK.
Server role: ROLE_DOMAIN_MEMBER
Press enter to see a dump of your service definitions

[global]
        workgroup = ZHAW
        realm = ZHAW.CH
        server string = "Test Datenserver mustang3"
        security = ADS
        use kerberos keytab = Yes
        log level = 10
        log file = /var/log/smbd.log
        max log size = 0
        load printers = No
        local master = No
        domain master = No
        wins server = 160.85.192.200
        lock directory = /var/spool/locks
        delete veto files = Yes
        veto files = /.AppleDB/.AppleDouble/.DS_Store/.bin/.AppleDesktop/Network Trash Folder/unix/
        wide links = No

[testshare]
        comment = Testshare
        path = /var/testshare
        valid users = kaph
        read only = No
        force create mode = 0775
        force directory mode = 02775
        use sendfile = Yes
---------------------------- 8< ----------------------------
Comment 1 Christoph Kaegi (mail account dead) 2008-06-02 07:00:38 UTC
*** Bug 5514 has been marked as a duplicate of this bug. ***
Comment 2 Jeremy Allison 2008-06-03 15:25:36 UTC
This entry in the log concerns me.

send_file_readX: sendfile failed for file SS2.FieldServiceManual.pdf (Bad address). Terminating

It looks like the code sendfile is broken on this platform. I'll get someone from Sun to investigate.

Jeremy.
Comment 3 Christoph Kaegi (mail account dead) 2008-06-04 01:03:24 UTC
Additional findings:

- setting sendfile=no doesn't help
- 3.0.30 does work
Comment 4 Volker Lendecke 2008-06-25 11:18:45 UTC
Just tried on a box that says

SunOS sunX 5.10 Generic sun4u sparc SUNW,Sun-Blade-1000

and I could not reproduce this. Hmmm.

Volker
Comment 5 Christoph Kaegi (mail account dead) 2008-07-03 02:41:56 UTC
While compiling Samba 3.2.0 again, I just discovered
this:

Compiling lib/sendfile.c
lib/sendfile.c: In function `sys_sendfile':
lib/sendfile.c:187: warning: cast from pointer to integer of different size

Does this ring a bell for somebody?

Comment 6 Christoph Kaegi (mail account dead) 2008-07-03 07:26:51 UTC
Created attachment 3382 [details]
Full Backtrace

This is a backtrace of the process which paniced
I set 'panic action=99999' and ran
  gdb /usr/sbin/samba --pid=<PidOfPanicedProcess>
Comment 7 Robert M Martel 2008-07-03 11:06:28 UTC
I may be seeing the same issue.  Samba 3.2.0 built using gcc 3.4.3 on Solaris 10 Sparc (SunOS techops 5.10 Generic_137111-02 sun4u sparc SUNW,Ultra-80)  This server is a member server of Active Directory.

Output of testparm and level 10 log files at
http://urban.csuohio.edu/~bob/samba_3.2 
Comment 8 Volker Lendecke 2008-07-04 03:47:38 UTC
Created attachment 3389 [details]
patch

Can you try the attached patch?

Thanks,

Volker
Comment 9 Volker Lendecke 2008-07-04 03:58:40 UTC
(In reply to comment #7)
> I may be seeing the same issue.  Samba 3.2.0 built using gcc 3.4.3 on Solaris
> 10 Sparc (SunOS techops 5.10 Generic_137111-02 sun4u sparc SUNW,Ultra-80)  This
> server is a member server of Active Directory.
> 
> Output of testparm and level 10 log files at
> http://urban.csuohio.edu/~bob/samba_3.2 
> 

That one looks different. Can you also provide a backtrace given the instructions here?

Thanks,

Volker
Comment 10 Christoph Kaegi (mail account dead) 2008-07-04 08:35:42 UTC
(In reply to comment #8)
> Created an attachment (id=3389) [edit]
> patch
> 
> Can you try the attached patch?

Thanks Volker, I applied this patch, but nothing
changed. Did you see comment #5 ?

Comment 11 Volker Lendecke 2008-07-04 09:38:54 UTC
(In reply to comment #10)
> Thanks Volker, I applied this patch, but nothing
> changed. Did you see comment #5 ?
> 

Yes, I did see comment #5. This would only apply however if you have "use sendfile = yes" activated. Can you send a new backtrace with the patch applied?

Thanks,

Volker
Comment 12 Christoph Kaegi (mail account dead) 2008-07-07 07:16:54 UTC
Created attachment 3392 [details]
Full Backtrace
Comment 13 Christoph Kaegi (mail account dead) 2008-07-07 07:22:43 UTC
(In reply to comment #11)
> Yes, I did see comment #5. This would only apply however if you have "use
> sendfile = yes" activated. Can you send a new backtrace with the patch applied?

OK, I just attached another backtrace made after I applied your patch.

I had to apply it by hand, btw. because 'patch -p3 <patchfile' 
in source/locking didn't work.
What would have been the proper way to apply it?

Thanks
Chris
Comment 14 Volker Lendecke 2008-07-07 07:28:48 UTC
Created attachment 3393 [details]
locking.c with the patch applied

Hmmm. What exact version are you running? I just tried to apply the patch, and it worked fine. I've attached the patched locking.c which comes from the 3.2.0 release.

Volker
Comment 15 Björn Jacke 2008-07-07 08:24:51 UTC
use gpatch (GNU patch), I often saw Sun's patch fail to apply unified diff patches created by GUN diff (or by git, can't remember...)
Comment 16 Christoph Kaegi (mail account dead) 2008-07-07 10:06:33 UTC
(In reply to comment #15)
> use gpatch (GNU patch), I often saw Sun's patch fail to apply unified diff
> patches created by GUN diff (or by git, can't remember...)
> 

Ah, thanks. That was it. 
gpatch -p3 <patchfile
now works...
Comment 17 Volker Lendecke 2008-07-07 13:32:27 UTC
What does work? Could you apply the patchfile and it still dies, or does the patch cure your problem?

Volker
Comment 18 Volker Lendecke 2008-07-09 13:47:29 UTC
Pushed the fix. Thanks,

Volker
Comment 19 Volker Lendecke 2008-07-09 13:55:04 UTC
fixed
Comment 20 Gerald (Jerry) Carter 2008-07-09 14:47:24 UTC
test
Comment 21 Christoph Kaegi (mail account dead) 2008-07-23 04:31:05 UTC
I'm very sorry having to reopen this bug, but it seems there's still some sendfile problems in 3.2.0:

While I can connect and browse shares ok, if i double click for example on a pdf file, Acroread starts but fails to open the document on the samba share.
smbd.log says:

send_file_readX: sendfile failed for file private/Arbeitszeitstatistiken/AZSt-2006.02.pdf (Bad address). Terminating

What can I do to help you find this bug?
Comment 22 Volker Lendecke 2008-08-11 14:21:23 UTC
Can you upload a new debug level 10 log with 3.2.1? The alignment-related patches went into 3.2.1, if there's a sendfile problem left we should catch that one now.

Volker
Comment 23 Christoph Kaegi (mail account dead) 2008-08-13 01:40:20 UTC
Here's the log created while running Samba 3.2.1

https://home.zhaw.ch/~kaph/smbd.log-3.2.1

Doubleclicking on a PDF File from a Windows Client
yields an acrobat reader without an open file
Comment 24 Dietrich Streifert 2009-01-13 03:59:48 UTC
This bug is still present in samba 3.2.7 on solaris 9 sparc.

uname -a: SunOS sambatest 5.9 Generic_112233-12 sun4u sparc SUNW,Ultra-4

Library stack is: libiconv-1.11, openssl-0.9.8j, heimdal-1.2.1, cyrus-sasl-2.1.22, openldap-0.9.8j

Compiler: gcc 3.4.5

./configure --prefix=/opt/visionet/samba --with-shared-modules=idmap_ad --with-ads --with-aio-support --with-acl-support --with-quotas --with-krb5=/opt/visionet/heimdal --with-ldap --with-winbind --with-pam --with-libiconv=/opt/visionet/iconv --with-included-popt

The relevant part of the log.smbd is:
[2009/01/13 10:32:01,  0] smbd/reply.c:send_file_readX(3236)
  send_file_readX: sendfile failed for file Normal.dot (Bad address). Terminating

A log level 10 logfile is attached.

Comment 25 Dietrich Streifert 2009-01-13 04:01:51 UTC
Created attachment 3867 [details]
smbd 3.2.7 log level 10 on solaris 9 sparc
Comment 26 Dietrich Streifert 2009-01-13 04:17:18 UTC
@Christoph Kaegi:

did you solve the bug for you or are you working now with use sendfile = No?

Comment 27 Christoph Kaegi (mail account dead) 2009-01-14 07:52:22 UTC
(In reply to comment #26)
> @Christoph Kaegi:
> 
> did you solve the bug for you or are you working now with use sendfile = No?
> 

No, I didn't solve the bug. We still run Samba 3.0.30...
Comment 28 Christoph Kaegi (mail account dead) 2009-04-29 07:02:37 UTC
Hello

Just wanted to add, that this bug is still up and alive with 3.3.4.
I have to use "use sendfile = no" in order for the shares to work.

The errormessage in smbd.log is now:

[2009/04/29 13:55:02,  0] smbd/reply.c:send_file_readX(3279)
  send_file_readX: sendfile failed for file print-2006.11/2006.03.06-171404.jpg (Bad address). Terminating
Comment 29 Volker Lendecke 2010-02-07 17:10:51 UTC
*** Bug 6951 has been marked as a duplicate of this bug. ***