Why does lsof complain about tracefs?How do I get rid of /sys/kernel/debug/tracing?How can I automatically log the names of songs I play in a VLC player window?How to identify the process that's sending error messages to terminal?What means this error message: lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/nes/.gvfs Why does lsof show the same file descriptor for different processes?What exactly is a connection through socket or what does the output of lsof tell us?Unable to debug Too Many Open Processes from lsoflsof does not detect reading images and video files for thumbnails
Why is Robin Hood French in Shrek?
You see a boat filled with people
For the Single Entry Schengen visa, do the microstates (Monaco, San Marino and the Vatican City) count?
Given small computational resources how navigation was implemented ( Not Samples of old guidance software)
RX vs TX operation in Software UART
What's the short and accented note at the very end of a song called?
How long would it take to build 30 miles of Roman road?
What does "Summoned creature has maximum hit points" actually mean?
What could an alternative fuel free transportation method look like?
Explanation for why nickel turns green in hydrochloric acid
Why didn't Petunia know that Harry wasn't supposed to use magic out of school?
If you have multiple planeswalkers, how many of their loyalty abilities can you use in a single turn?
How can I increase the rate of regeneration in humans without the possibility of tumors developing?
What is an idiom, phrase or expression for situation such as "throw a pigeon among cats"
How are hillsides farmed?
How can I more clearly ask people to accomodate for my autism?
Is it safe to plug one travel adapter into another?
Are these 2 resistors in parallel?
What do I get by paying more for a bicycle?
Why would shrinking TEMPDB log lead to slowness?
Foiled Bank Robbery
A Change in Perspective
What's the origin of the trope that dragons used to be common but aren't any more?
Had J. K. Rowling seen This Is Spinal Tap before writing Harry Potter and the Philosopher's Stone?
Why does lsof complain about tracefs?
How do I get rid of /sys/kernel/debug/tracing?How can I automatically log the names of songs I play in a VLC player window?How to identify the process that's sending error messages to terminal?What means this error message: lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/nes/.gvfs Why does lsof show the same file descriptor for different processes?What exactly is a connection through socket or what does the output of lsof tell us?Unable to debug Too Many Open Processes from lsoflsof does not detect reading images and video files for thumbnails
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
Every execution of lsof
issues a warning about the TraceFS:
$ lsof any-file
lsof: WARNING: can't stat() tracefs file system /sys/kernel/debug/tracing
Output information may be incomplete.
$ mount | grep trace
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
(This is on Ubuntu 15.10, fully updated)
Is it normal for TraceFS to be mounted during normal operation?
If so, how can I tell lsof
to skip it?
filesystem lsof
add a comment
|
Every execution of lsof
issues a warning about the TraceFS:
$ lsof any-file
lsof: WARNING: can't stat() tracefs file system /sys/kernel/debug/tracing
Output information may be incomplete.
$ mount | grep trace
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
(This is on Ubuntu 15.10, fully updated)
Is it normal for TraceFS to be mounted during normal operation?
If so, how can I tell lsof
to skip it?
filesystem lsof
add a comment
|
Every execution of lsof
issues a warning about the TraceFS:
$ lsof any-file
lsof: WARNING: can't stat() tracefs file system /sys/kernel/debug/tracing
Output information may be incomplete.
$ mount | grep trace
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
(This is on Ubuntu 15.10, fully updated)
Is it normal for TraceFS to be mounted during normal operation?
If so, how can I tell lsof
to skip it?
filesystem lsof
Every execution of lsof
issues a warning about the TraceFS:
$ lsof any-file
lsof: WARNING: can't stat() tracefs file system /sys/kernel/debug/tracing
Output information may be incomplete.
$ mount | grep trace
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
(This is on Ubuntu 15.10, fully updated)
Is it normal for TraceFS to be mounted during normal operation?
If so, how can I tell lsof
to skip it?
filesystem lsof
filesystem lsof
asked Mar 21 '16 at 11:17
ZilkZilk
2001 silver badge9 bronze badges
2001 silver badge9 bronze badges
add a comment
|
add a comment
|
4 Answers
4
active
oldest
votes
The answer to your question is in the file permissions:
try:
$ ls -l /sys/kernel/debug/tracing
ls: cannot access '/sys/kernel/debug/tracing': Permission denied
$ ls -l /sys/kernel
total 0
...
drwx------ 31 root root 0 2016-06-15 11:06:47 debug
...
So, normal users are not allowed to access /sys/kernel/debug/tracing
and there seems to be no way to ask lsof
to avoid accessing it.
We could then discuss whether this is a bug or not, but the answer to your question boils down to this.
What do you mean "bug"? "lsof" needs to be executed with "sudo" or as "root".
– Rinzwind
Jun 15 '16 at 10:00
1
lsof doesn't need to be run as root. We can discuss about its security (see man lsof) but it definitely doesn't need to be run only with superuser grants. It sits in /usr/bin not in /usr/sbin.
– EnzoR
Jun 15 '16 at 10:12
"No way to avoid it" is a perfectly acceptable answer. Besides, it appears that TraceFS no longer gets mounted by default as of Ubuntu 16.04; the warning when runninglsof
as a normal user has now disappeared.
– Zilk
Jun 16 '16 at 20:20
3
I'm on 16.04, it hasn't disappeared - still an issue.
– TenLeftFingers
Oct 27 '16 at 15:41
@TenLeftFingers It's working in my up-to-date Kubuntu 16.04!
– EnzoR
Oct 27 '16 at 16:24
|
show 2 more comments
I had the same problem and this answer helped me to understand the problem a little better.
I've found out that one way to remove the annoying warning is to umount debugfs
mount | grep debugfs
none on /sys/kernel/debug type debugfs (rw,_netdev)
sudo umount $(mount | grep debugfs | awk 'print $3')
If you now run lsof
there is no warning.
2
this is really why I came looking. I don't care so much why the error is showing up. I really just want it to go away. Thanks damko!
– cjac
Jan 22 '18 at 21:32
umount: /sys/kernel/debug: target is busy.
– msangel
Aug 4 at 0:34
add a comment
|
The issue is that you do not have permission to access the debugfs directory. The tracefs directory was created to allow people to mount the tracing directory directly at /sys/kernel/tracing and not require enabling debugfs. But for backward compatibility, when mounting the debugfs directory, it would automatically mount tracefs in the "tracing" directory of debugfs.
Now when you perform lsof it looks at the /proc/filesystems file as well as /proc/mounts. It sees that tracefs is mounted at /sys/kernel/debug/tracing, and thus tries to stat it. Unfortunately, because /sys/kernel/debug wont let non-root users see inside of it, you get the error message when trying to stat the directory "tracing" from within /sys/kernel/debug. If you unmount the debugfs directory, the warning will go away.
add a comment
|
The Warning is written to stderr. You can always just redirect this to the /dev/null:
lsof <any-file> 2>/dev/null
Cheers,
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f748498%2fwhy-does-lsof-complain-about-tracefs%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
The answer to your question is in the file permissions:
try:
$ ls -l /sys/kernel/debug/tracing
ls: cannot access '/sys/kernel/debug/tracing': Permission denied
$ ls -l /sys/kernel
total 0
...
drwx------ 31 root root 0 2016-06-15 11:06:47 debug
...
So, normal users are not allowed to access /sys/kernel/debug/tracing
and there seems to be no way to ask lsof
to avoid accessing it.
We could then discuss whether this is a bug or not, but the answer to your question boils down to this.
What do you mean "bug"? "lsof" needs to be executed with "sudo" or as "root".
– Rinzwind
Jun 15 '16 at 10:00
1
lsof doesn't need to be run as root. We can discuss about its security (see man lsof) but it definitely doesn't need to be run only with superuser grants. It sits in /usr/bin not in /usr/sbin.
– EnzoR
Jun 15 '16 at 10:12
"No way to avoid it" is a perfectly acceptable answer. Besides, it appears that TraceFS no longer gets mounted by default as of Ubuntu 16.04; the warning when runninglsof
as a normal user has now disappeared.
– Zilk
Jun 16 '16 at 20:20
3
I'm on 16.04, it hasn't disappeared - still an issue.
– TenLeftFingers
Oct 27 '16 at 15:41
@TenLeftFingers It's working in my up-to-date Kubuntu 16.04!
– EnzoR
Oct 27 '16 at 16:24
|
show 2 more comments
The answer to your question is in the file permissions:
try:
$ ls -l /sys/kernel/debug/tracing
ls: cannot access '/sys/kernel/debug/tracing': Permission denied
$ ls -l /sys/kernel
total 0
...
drwx------ 31 root root 0 2016-06-15 11:06:47 debug
...
So, normal users are not allowed to access /sys/kernel/debug/tracing
and there seems to be no way to ask lsof
to avoid accessing it.
We could then discuss whether this is a bug or not, but the answer to your question boils down to this.
What do you mean "bug"? "lsof" needs to be executed with "sudo" or as "root".
– Rinzwind
Jun 15 '16 at 10:00
1
lsof doesn't need to be run as root. We can discuss about its security (see man lsof) but it definitely doesn't need to be run only with superuser grants. It sits in /usr/bin not in /usr/sbin.
– EnzoR
Jun 15 '16 at 10:12
"No way to avoid it" is a perfectly acceptable answer. Besides, it appears that TraceFS no longer gets mounted by default as of Ubuntu 16.04; the warning when runninglsof
as a normal user has now disappeared.
– Zilk
Jun 16 '16 at 20:20
3
I'm on 16.04, it hasn't disappeared - still an issue.
– TenLeftFingers
Oct 27 '16 at 15:41
@TenLeftFingers It's working in my up-to-date Kubuntu 16.04!
– EnzoR
Oct 27 '16 at 16:24
|
show 2 more comments
The answer to your question is in the file permissions:
try:
$ ls -l /sys/kernel/debug/tracing
ls: cannot access '/sys/kernel/debug/tracing': Permission denied
$ ls -l /sys/kernel
total 0
...
drwx------ 31 root root 0 2016-06-15 11:06:47 debug
...
So, normal users are not allowed to access /sys/kernel/debug/tracing
and there seems to be no way to ask lsof
to avoid accessing it.
We could then discuss whether this is a bug or not, but the answer to your question boils down to this.
The answer to your question is in the file permissions:
try:
$ ls -l /sys/kernel/debug/tracing
ls: cannot access '/sys/kernel/debug/tracing': Permission denied
$ ls -l /sys/kernel
total 0
...
drwx------ 31 root root 0 2016-06-15 11:06:47 debug
...
So, normal users are not allowed to access /sys/kernel/debug/tracing
and there seems to be no way to ask lsof
to avoid accessing it.
We could then discuss whether this is a bug or not, but the answer to your question boils down to this.
edited Jun 15 '16 at 10:17
answered Jun 15 '16 at 9:43
EnzoREnzoR
1,25012 silver badges26 bronze badges
1,25012 silver badges26 bronze badges
What do you mean "bug"? "lsof" needs to be executed with "sudo" or as "root".
– Rinzwind
Jun 15 '16 at 10:00
1
lsof doesn't need to be run as root. We can discuss about its security (see man lsof) but it definitely doesn't need to be run only with superuser grants. It sits in /usr/bin not in /usr/sbin.
– EnzoR
Jun 15 '16 at 10:12
"No way to avoid it" is a perfectly acceptable answer. Besides, it appears that TraceFS no longer gets mounted by default as of Ubuntu 16.04; the warning when runninglsof
as a normal user has now disappeared.
– Zilk
Jun 16 '16 at 20:20
3
I'm on 16.04, it hasn't disappeared - still an issue.
– TenLeftFingers
Oct 27 '16 at 15:41
@TenLeftFingers It's working in my up-to-date Kubuntu 16.04!
– EnzoR
Oct 27 '16 at 16:24
|
show 2 more comments
What do you mean "bug"? "lsof" needs to be executed with "sudo" or as "root".
– Rinzwind
Jun 15 '16 at 10:00
1
lsof doesn't need to be run as root. We can discuss about its security (see man lsof) but it definitely doesn't need to be run only with superuser grants. It sits in /usr/bin not in /usr/sbin.
– EnzoR
Jun 15 '16 at 10:12
"No way to avoid it" is a perfectly acceptable answer. Besides, it appears that TraceFS no longer gets mounted by default as of Ubuntu 16.04; the warning when runninglsof
as a normal user has now disappeared.
– Zilk
Jun 16 '16 at 20:20
3
I'm on 16.04, it hasn't disappeared - still an issue.
– TenLeftFingers
Oct 27 '16 at 15:41
@TenLeftFingers It's working in my up-to-date Kubuntu 16.04!
– EnzoR
Oct 27 '16 at 16:24
What do you mean "bug"? "lsof" needs to be executed with "sudo" or as "root".
– Rinzwind
Jun 15 '16 at 10:00
What do you mean "bug"? "lsof" needs to be executed with "sudo" or as "root".
– Rinzwind
Jun 15 '16 at 10:00
1
1
lsof doesn't need to be run as root. We can discuss about its security (see man lsof) but it definitely doesn't need to be run only with superuser grants. It sits in /usr/bin not in /usr/sbin.
– EnzoR
Jun 15 '16 at 10:12
lsof doesn't need to be run as root. We can discuss about its security (see man lsof) but it definitely doesn't need to be run only with superuser grants. It sits in /usr/bin not in /usr/sbin.
– EnzoR
Jun 15 '16 at 10:12
"No way to avoid it" is a perfectly acceptable answer. Besides, it appears that TraceFS no longer gets mounted by default as of Ubuntu 16.04; the warning when running
lsof
as a normal user has now disappeared.– Zilk
Jun 16 '16 at 20:20
"No way to avoid it" is a perfectly acceptable answer. Besides, it appears that TraceFS no longer gets mounted by default as of Ubuntu 16.04; the warning when running
lsof
as a normal user has now disappeared.– Zilk
Jun 16 '16 at 20:20
3
3
I'm on 16.04, it hasn't disappeared - still an issue.
– TenLeftFingers
Oct 27 '16 at 15:41
I'm on 16.04, it hasn't disappeared - still an issue.
– TenLeftFingers
Oct 27 '16 at 15:41
@TenLeftFingers It's working in my up-to-date Kubuntu 16.04!
– EnzoR
Oct 27 '16 at 16:24
@TenLeftFingers It's working in my up-to-date Kubuntu 16.04!
– EnzoR
Oct 27 '16 at 16:24
|
show 2 more comments
I had the same problem and this answer helped me to understand the problem a little better.
I've found out that one way to remove the annoying warning is to umount debugfs
mount | grep debugfs
none on /sys/kernel/debug type debugfs (rw,_netdev)
sudo umount $(mount | grep debugfs | awk 'print $3')
If you now run lsof
there is no warning.
2
this is really why I came looking. I don't care so much why the error is showing up. I really just want it to go away. Thanks damko!
– cjac
Jan 22 '18 at 21:32
umount: /sys/kernel/debug: target is busy.
– msangel
Aug 4 at 0:34
add a comment
|
I had the same problem and this answer helped me to understand the problem a little better.
I've found out that one way to remove the annoying warning is to umount debugfs
mount | grep debugfs
none on /sys/kernel/debug type debugfs (rw,_netdev)
sudo umount $(mount | grep debugfs | awk 'print $3')
If you now run lsof
there is no warning.
2
this is really why I came looking. I don't care so much why the error is showing up. I really just want it to go away. Thanks damko!
– cjac
Jan 22 '18 at 21:32
umount: /sys/kernel/debug: target is busy.
– msangel
Aug 4 at 0:34
add a comment
|
I had the same problem and this answer helped me to understand the problem a little better.
I've found out that one way to remove the annoying warning is to umount debugfs
mount | grep debugfs
none on /sys/kernel/debug type debugfs (rw,_netdev)
sudo umount $(mount | grep debugfs | awk 'print $3')
If you now run lsof
there is no warning.
I had the same problem and this answer helped me to understand the problem a little better.
I've found out that one way to remove the annoying warning is to umount debugfs
mount | grep debugfs
none on /sys/kernel/debug type debugfs (rw,_netdev)
sudo umount $(mount | grep debugfs | awk 'print $3')
If you now run lsof
there is no warning.
answered Jan 26 '17 at 8:25
damkodamko
1312 bronze badges
1312 bronze badges
2
this is really why I came looking. I don't care so much why the error is showing up. I really just want it to go away. Thanks damko!
– cjac
Jan 22 '18 at 21:32
umount: /sys/kernel/debug: target is busy.
– msangel
Aug 4 at 0:34
add a comment
|
2
this is really why I came looking. I don't care so much why the error is showing up. I really just want it to go away. Thanks damko!
– cjac
Jan 22 '18 at 21:32
umount: /sys/kernel/debug: target is busy.
– msangel
Aug 4 at 0:34
2
2
this is really why I came looking. I don't care so much why the error is showing up. I really just want it to go away. Thanks damko!
– cjac
Jan 22 '18 at 21:32
this is really why I came looking. I don't care so much why the error is showing up. I really just want it to go away. Thanks damko!
– cjac
Jan 22 '18 at 21:32
umount: /sys/kernel/debug: target is busy.
– msangel
Aug 4 at 0:34
umount: /sys/kernel/debug: target is busy.
– msangel
Aug 4 at 0:34
add a comment
|
The issue is that you do not have permission to access the debugfs directory. The tracefs directory was created to allow people to mount the tracing directory directly at /sys/kernel/tracing and not require enabling debugfs. But for backward compatibility, when mounting the debugfs directory, it would automatically mount tracefs in the "tracing" directory of debugfs.
Now when you perform lsof it looks at the /proc/filesystems file as well as /proc/mounts. It sees that tracefs is mounted at /sys/kernel/debug/tracing, and thus tries to stat it. Unfortunately, because /sys/kernel/debug wont let non-root users see inside of it, you get the error message when trying to stat the directory "tracing" from within /sys/kernel/debug. If you unmount the debugfs directory, the warning will go away.
add a comment
|
The issue is that you do not have permission to access the debugfs directory. The tracefs directory was created to allow people to mount the tracing directory directly at /sys/kernel/tracing and not require enabling debugfs. But for backward compatibility, when mounting the debugfs directory, it would automatically mount tracefs in the "tracing" directory of debugfs.
Now when you perform lsof it looks at the /proc/filesystems file as well as /proc/mounts. It sees that tracefs is mounted at /sys/kernel/debug/tracing, and thus tries to stat it. Unfortunately, because /sys/kernel/debug wont let non-root users see inside of it, you get the error message when trying to stat the directory "tracing" from within /sys/kernel/debug. If you unmount the debugfs directory, the warning will go away.
add a comment
|
The issue is that you do not have permission to access the debugfs directory. The tracefs directory was created to allow people to mount the tracing directory directly at /sys/kernel/tracing and not require enabling debugfs. But for backward compatibility, when mounting the debugfs directory, it would automatically mount tracefs in the "tracing" directory of debugfs.
Now when you perform lsof it looks at the /proc/filesystems file as well as /proc/mounts. It sees that tracefs is mounted at /sys/kernel/debug/tracing, and thus tries to stat it. Unfortunately, because /sys/kernel/debug wont let non-root users see inside of it, you get the error message when trying to stat the directory "tracing" from within /sys/kernel/debug. If you unmount the debugfs directory, the warning will go away.
The issue is that you do not have permission to access the debugfs directory. The tracefs directory was created to allow people to mount the tracing directory directly at /sys/kernel/tracing and not require enabling debugfs. But for backward compatibility, when mounting the debugfs directory, it would automatically mount tracefs in the "tracing" directory of debugfs.
Now when you perform lsof it looks at the /proc/filesystems file as well as /proc/mounts. It sees that tracefs is mounted at /sys/kernel/debug/tracing, and thus tries to stat it. Unfortunately, because /sys/kernel/debug wont let non-root users see inside of it, you get the error message when trying to stat the directory "tracing" from within /sys/kernel/debug. If you unmount the debugfs directory, the warning will go away.
answered May 29 at 14:05
nevetsnevets
211 bronze badge
211 bronze badge
add a comment
|
add a comment
|
The Warning is written to stderr. You can always just redirect this to the /dev/null:
lsof <any-file> 2>/dev/null
Cheers,
add a comment
|
The Warning is written to stderr. You can always just redirect this to the /dev/null:
lsof <any-file> 2>/dev/null
Cheers,
add a comment
|
The Warning is written to stderr. You can always just redirect this to the /dev/null:
lsof <any-file> 2>/dev/null
Cheers,
The Warning is written to stderr. You can always just redirect this to the /dev/null:
lsof <any-file> 2>/dev/null
Cheers,
answered Apr 30 at 9:35
QuickPrototypeQuickPrototype
1011 bronze badge
1011 bronze badge
add a comment
|
add a comment
|
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f748498%2fwhy-does-lsof-complain-about-tracefs%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown