ARM coredumps zero-length on NFS mount

Bug #1034340 reported by Greg Law
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Linaro Evaluation Build
Invalid
Undecided
Unassigned
linux (Ubuntu)
Confirmed
Medium
Bryan Wu

Bug Description

I'm using Ubuntu 1204 for ARM on a beagleboard.

When I generate a coredump when cwd is an nfs mount, the resutling coredump has zero length. If I generate the same coredump on /tmp, I get a valid coredump.

I can work around by setting corepattern to point all corefiles at /tmp, but this is not ideal as my beagleboard has limited storage available (hence the reason I'm using an NFS mount in the first place!)

Some details from the system:

gel@beagle1 ~ $ lsb_release
No LSB modules are available.
gel@beagle1 ~ $ cat /etc/issue
Ubuntu 12.04 LTS \n \l

gel@beagle1 ~ $ uname -a
Linux beagle1 3.2.0-23-omap #36-Ubuntu Tue Apr 10 20:24:21 UTC 2012 armv7l armv7l armv7l GNU/Linux
gel@beagle1 ~ $
---
AcpiTables:

AlsaDevices:
 total 0
 crw-rw---T 1 root audio 116, 1 Aug 8 11:14 seq
 crw-rw---T 1 root audio 116, 33 Aug 8 11:14 timer
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
AplayDevices: Error: [Errno 2] No such file or directory
ApportVersion: 2.0.1-0ubuntu12
Architecture: armhf
ArecordDevices: Error: [Errno 2] No such file or directory
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
CurrentDmesg:
 Error: command ['sh', '-c', 'dmesg | comm -13 --nocheck-order /var/log/dmesg -'] failed with exit code 1: comm: /var/log/dmesg: Permission denied
 dmesg: write failed: Broken pipe
DistroRelease: Ubuntu 12.04
IwConfig: Error: [Errno 2] No such file or directory
Lsusb:
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
 Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Package: linux (not installed)
PciMultimedia:

ProcEnviron:
 LANGUAGE=en_ZM:en
 TERM=xterm
 PATH=(custom, user)
 LANG=en_ZM
 SHELL=/bin/bash
ProcFB:
 0 omapfb
 1 omapfb
 2 omapfb
ProcKernelCmdLine: ro elevator=noop vram=12M omapfb.mode=dvi:1280x720MR-16@60 mpurate=auto root=UUID=1c0421bf-17cf-451c-9a1d-2293c7817b28 fixrtc quiet splash console=ttyO2,115200n8
ProcVersionSignature: Ubuntu 3.2.0-23.36-omap 3.2.14
RfKill: Error: [Errno 2] No such file or directory
Tags: precise
Uname: Linux 3.2.0-23-omap armv7l
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

WifiSyslog:
---
AcpiTables:

AlsaDevices:
 total 0
 crw-rw---T 1 root audio 116, 1 Aug 8 11:20 seq
 crw-rw---T 1 root audio 116, 33 Aug 8 11:20 timer
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
AplayDevices: Error: [Errno 2] No such file or directory
ApportVersion: 2.0.1-0ubuntu12
Architecture: armhf
ArecordDevices: Error: [Errno 2] No such file or directory
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
CurrentDmesg:
 Error: command ['sh', '-c', 'dmesg | comm -13 --nocheck-order /var/log/dmesg -'] failed with exit code 1: comm: /var/log/dmesg: Permission denied
 dmesg: write failed: Broken pipe
DistroRelease: Ubuntu 12.04
IwConfig: Error: [Errno 2] No such file or directory
Lsusb:
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
 Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Package: linux (not installed)
PciMultimedia:

ProcEnviron:
 LANGUAGE=en_ZM:en
 TERM=xterm
 PATH=(custom, user)
 LANG=en_ZM
 SHELL=/bin/bash
ProcFB:
 0 omapfb
 1 omapfb
 2 omapfb
ProcKernelCmdLine: ro elevator=noop vram=12M omapfb.mode=dvi:1280x720MR-16@60 mpurate=auto root=UUID=1c0421bf-17cf-451c-9a1d-2293c7817b28 fixrtc quiet splash console=ttyO2,115200n8
ProcVersionSignature: Ubuntu 3.2.0-23.36-omap 3.2.14
RfKill: Error: [Errno 2] No such file or directory
Tags: precise
Uname: Linux 3.2.0-23-omap armv7l
UnreportableReason: Your system partition has less than 0 MB of free space available, which leads to problems using applications and installing updates. Please free some space.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

WifiSyslog:

Steve Langasek (vorlon)
affects: nfs-utils (Ubuntu) → linux (Ubuntu)
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1034340

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: precise
Revision history for this message
Greg Law (glaw) wrote : ProcCpuinfo.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Greg Law (glaw) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Greg Law (glaw) wrote : ProcModules.txt

apport information

Revision history for this message
Greg Law (glaw) wrote : UdevDb.txt

apport information

Revision history for this message
Greg Law (glaw) wrote : UdevLog.txt

apport information

Revision history for this message
Greg Law (glaw) wrote :

I ran apport-collect as requested. Not quite sure it's done everything it should have though: terminal output pasted below.

$ apport-collect 1034340
The authorization page:
 (https://launchpad.net/+authorize-token?oauth_token=lMfRpCXxTMvZ07MRlxkv&allow_permission=DESKTOP_INTEGRATION)
should be opening in your browser. Use your browser to authorize
this program to access Launchpad on your behalf.
Press any key to continue or wait (5) seconds...
Waiting to hear from Launchpad about your decision...

*** Collecting problem information

The collected information can be sent to the developers to improve the
application. This might take a few minutes.
...No packages found matching linux.
.......tail: cannot open `/var/log/syslog' for reading: Permission denied
.ERROR: hook /usr/share/apport/package-hooks//source_linux.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 769, in add_hooks_info
    symb['add_info'](self, ui)
  File "/usr/share/apport/package-hooks//source_linux.py", line 53, in add_info
    staging_drivers = re.findall("(\w+): module is from the staging directory", report['BootDmesg'])
  File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'BootDmesg'
....

*** Send problem report to the developers?

After the problem report has been sent, please fill out the form in the
automatically opened web browser.

What would you like to do? Your options are:
  S: Send report (239.2 KB)
  V: View report
  K: Keep report file for sending later or copying to somewhere else
  I: Cancel and ignore future crashes of this program version
  C: Cancel
Please choose (S/V/K/I/C):
What would you like to do? Your options are:
  S: Send report (239.2 KB)
  V: View report
  K: Keep report file for sending later or copying to somewhere else
  I: Cancel and ignore future crashes of this program version
  C: Cancel
Please choose (S/V/K/I/C): s
 $

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Bryan Wu (cooloney) wrote :

Greg,

Could you please post your program who generate the codedump file? I can try that on my side.

Changed in linux (Ubuntu):
assignee: nobody → Bryan Wu (cooloney)
Revision history for this message
Greg Law (glaw) wrote :

I think any program that seg faults will do it, but I've attached the program I was using in this case. Just compile it with "gcc test16.c" and then run the resulting ./a.out on a NFS-mounted working directory.

Revision history for this message
Bryan Wu (cooloney) wrote :

I think this is probably not an ARM specific issue. And if you run the ./a.out in a non-nfs directory as a normal user, you will get coredump file. But if you try the same in a nfs mounted directory, it won't generate coredump file due to some potential security issues which i found in some NFS upstream developer's discussion.

So if you wanna get coredump file in an NFS mounted directory, you have to run the ./a.out as root "sudo ./a.out". Then you will get the coredump file in NFS directory.

This is also true for both X86 PC and ARM.

-Bryan

Changed in linux (Ubuntu):
status: Confirmed → Invalid
Greg Law (glaw)
Changed in linux (Ubuntu):
status: Invalid → New
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1034340

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Greg Law (glaw) wrote :

Hi Bryan,

I'd like just to revisit this before we close it as invalid if that's OK.

Could you reference me to the NFS discussion you refer to? It doesn't quite stack up to me for the following reasons:

(i) Dumping corefile on an NFS mounted directory using Ubuntu 12.04 on x86 works just fine for me.

(ii) On ARM a corefile is written, it's just that it has zero length. So security doesn't seem to be a sensible answer: either I can write to the directory, or I cannot (if I can write zero length files I could just fill the directory with zero-length files).

(iii) Requring root access is positively bad for security - in general we don't want things to be running as root unless they need to be.

(iv) Usually on NFS the opposite of what you say is true: typically NFS is mounted with "root squash" which means that if you are root you often cannot write to an NFS-mounted directory. So I can see how it would often be required *NOT* to run using sudo if you want a corefile to appear on NFS directories (but as per (ii) above, in this case if you were to run as root then I would expect no corefile, not a zero-length corefile.

Sorry to be a pain, but I think there is more to this.

Revision history for this message
Greg Law (glaw) wrote : ProcCpuinfo.txt

apport information

description: updated
Revision history for this message
Greg Law (glaw) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Greg Law (glaw) wrote : ProcModules.txt

apport information

Revision history for this message
Greg Law (glaw) wrote : UdevDb.txt

apport information

Revision history for this message
Greg Law (glaw) wrote : UdevLog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Greg Law (glaw) wrote :

apport-collect 1034340

Revision history for this message
Patola (patola) wrote :

Sorry, I just clicked around and accidentally added this... And I can't delete it now

Changed in ubuntu-leb:
status: New → Invalid
Revision history for this message
Greg Law (glaw) wrote :

Not sure why this got marked 'invalid' - the bug is still present.

Changed in ubuntu-leb:
status: Invalid → Confirmed
Revision history for this message
Fathi Boudra (fboudra) wrote :

It's invalid for Ubuntu Linaro evaluation build (a derived distro)

Changed in ubuntu-leb:
status: Confirmed → Invalid
Revision history for this message
Greg Law (glaw) wrote : Re: [Bug 1034340] Re: ARM coredumps zero-length on NFS mount

On 22/01/13 18:52, Fathi Boudra wrote:
> It's invalid for Ubuntu Linaro evaluation build (a derived distro)
>
> ** Changed in: ubuntu-leb
> Status: Confirmed => Invalid

Makes sense ... but then where do I report this bug? I'm pretty sure
it's real, and it's rather inconvenient.

Greg

--
Greg Law, Undo Software http://undo-software.com/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.