change and modify times swapped on devpts entries

Bug #1175321 reported by Todd C. Miller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Description: Ubuntu 13.04
Release: 13.04

In Ubuntu 13.04 the mtime and ctime of devpts devices appears to be swapped. In earlier Ubuntu releases (and all other Linux systems I;ve used) the ctime gets set on the tty device when it is created and only the modify time changes. However, in 13.04 the opposite appears to be the case. For example:

Ubuntu 12.04:
precise [~] % w
 13:31:30 up 9 min, 1 user, load average: 0.00, 0.05, 0.05
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
millert pts/0 172.16.154.1 13:25 0.00s 0.14s 0.00s w

precise [~] % stat `tty`
  File: `/dev/pts/0'
  Size: 0 Blocks: 0 IO Block: 1024 character special file
Device: bh/11d Inode: 3 Links: 1 Device type: 88,0
Access: (0620/crw--w----) Uid: ( 1000/ millert) Gid: ( 5/ tty)
Access: 2013-05-01 13:31:45.502294725 -0700
Modify: 2013-05-01 13:31:45.502294725 -0700
Change: 2013-05-01 13:25:30.501332348 -0700
 Birth: -

In the above you can see that the tty's ctime matches the login time.

Ubuntu 13.04:
raring [~] % w
 16:32:37 up 2:43, 2 users, load average: 1.21, 1.02, 0.91
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
millert pts/1 172.16.154.1 14:22 2:10m 0.18s 0.00s w

raring [~] % stat `tty`
  File: ‘/dev/pts/1’
  Size: 0 Blocks: 0 IO Block: 1024 character special file
Device: bh/11d Inode: 4 Links: 1 Device type: 88,1
Access: (0600/crw-------) Uid: ( 1000/ millert) Gid: ( 5/ tty)
Access: 2013-05-01 14:22:08.374057421 -0400
Modify: 2013-05-01 14:22:08.374057421 -0400
Change: 2013-05-01 14:42:10.798080706 -0400
 Birth: -

In 13.04 the modify time is unchanged after login but the change time is updated as the tty is used.

What uses the ctime of devpts ttys you might ask? Sudo does. Sudo uses the ctime of a devpts device node to detect when a tty has been recycled. As a result, sudo on 13.04 will require the user enter their password almost all the time.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1175321/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → linux-meta (Ubuntu)
Brad Figg (brad-figg)
affects: linux-meta (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 1175321

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: raring
Revision history for this message
Todd C. Miller (todd-miller) wrote :

apport-collect crashes as follows:

ERROR: hook /usr/share/apport/general-hooks/cloud_archive.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 197, in _run_hook
    symb['add_info'](report, ui)
  File "/usr/share/apport/general-hooks/cloud_archive.py", line 18, in add_info
    if '~cloud' in packaging.get_version(package) and \
  File "/usr/lib/python2.7/dist-packages/apport/packaging_impl.py", line 123, in get_version
    raise ValueError('package %s does not exist' % package)
ValueError: package linux does not exist
dpkg-query: no packages found matching linux

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.9 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.9-raring/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Todd C. Miller (todd-miller) wrote :

Bug does not appear to be present with mainline kernel 3.8.8-030808:

raring [~] % stat `tty`
  File: ‘/dev/pts/0’
  Size: 0 Blocks: 0 IO Block: 1024 character special file
Device: bh/11d Inode: 3 Links: 1 Device type: 88,0
Access: (0620/crw--w----) Uid: ( 1000/ millert) Gid: ( 5/ tty)
Access: 2013-05-02 14:21:10.969008372 -0400
Modify: 2013-05-02 14:21:10.969008372 -0400
Change: 2013-05-02 14:18:49.201928003 -0400
 Birth: -

tags: added: kernel-fixed-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
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.