You are not logged in.

#1 2015-04-15 22:38:37

davidAK
Member
Registered: 2015-04-15
Posts: 7

Pacman Stale file handle

Hi,

I got an error message everytime i use pacman:

error: could not open file /var/lib/pacman/local/gnome-shell-extension-atom-dash-git-26.472abad-1/desc: Stale file handle
looking for conflicting packages...

When I try to delete it, I get:

/v/l/p/local ❯❯❯ sudo pacman -Rdd gnome-shell-extension-atom-dash-git                                                   ⏎
error: could not open file /var/lib/pacman/local/gnome-shell-extension-atom-dash-git-26.472abad-1/desc: Stale file handle
warning: could not fully load metadata for package gnome-shell-extension-atom-dash-git-26.472abad-1

Packages (1) gnome-shell-extension-atom-dash-git-26.472abad-1


:: Do you want to remove these packages? [Y/n] y
(1/1) removing gnome-shell-extension-atom-dash-git                        [-----------------------------------------] 100%
error: could not remove database entry gnome-shell-extension-atom-dash-git-26.472abad-1

/v/l/p/local ❯❯❯ 

The output of ls -l is:

~ ❯❯❯ ls -l /var/lib/pacman/local/gnome-shell-extension-atom-dash-git-26.472abad-1
ls: cannot access /var/lib/pacman/local/gnome-shell-extension-atom-dash-git-26.472abad-1: Stale file handle

I have really no idea whats going on, any help would be apreciated.

In case It's important; I'm running

~ ❯❯❯ uname -a
Linux davidXPS 3.19.3-3-ARCH #1 SMP PREEMPT Wed Apr 8 14:10:00 CEST 2015 x86_64 GNU/Linux

Offline

#2 2015-04-15 23:07:00

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,901
Website

Re: Pacman Stale file handle

Looks like this is a problem with your fliesystem, rather than pacman. Most results on $searchengine assume you mean an NFS fliesystem (and I sincerely hope you're not storing your pacman library on one of those), but there's a few hits other regarding other filesystems, none of which appear particularly useful..

Please tell us what filesystem /var/lib/pacman/local resides upon. If it's a fsckable filesystem, I'd recommend that you proceed to fsck it.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2015-04-15 23:12:58

davidAK
Member
Registered: 2015-04-15
Posts: 7

Re: Pacman Stale file handle

The filesystem for root is BTRFS.
I tried to use fsck -r from the wiki

~ ❯❯❯ sudo fsck -r /dev/sda2                                                  ⏎
fsck from util-linux 2.26.1
~ ❯❯❯ 

Last edited by davidAK (2015-04-15 23:13:16)

Offline

#4 2015-04-15 23:39:04

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,901
Website

Re: Pacman Stale file handle

Btrfs isn't fsck-able in the traditional sense. However, you can run

btrfs scrub start /path/to/filesytem

on the live filesystem to run an integrity of the files contained within it. Check the progress of this with

btrfs scrub status /path/to/filesytem

If the scrub completes without error, unmount the filesystem and run

btrfs check /dev/sda2

(note that you indicated that sda2 was the correct filesystem previously, if this has changed, alter the command accordingly)

Post the output of that command here. Do not try --repair yet.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2015-04-16 09:49:30

davidAK
Member
Registered: 2015-04-15
Posts: 7

Re: Pacman Stale file handle

~ ❯❯❯ sudo btrfs scrub status /dev/sda2                                       ⏎
scrub status for 01386247-bad7-40e9-841f-390a0a7d19d3
	scrub started at Thu Apr 16 11:47:51 2015, running for 15 seconds
	total bytes scrubbed: 5.27GiB with 9 errors
	error details: csum=9
	corrected errors: 0, uncorrectable errors: 9, unverified errors: 0
~ ❯❯❯ ERROR: There are uncorrectable errors.

Do I just reinstall my system?

Offline

#6 2015-04-16 11:04:32

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Pacman Stale file handle

First make sure that your hard drive is in a good condition.

What is the output of

# smartctl -a <device>

Also, you might want to run self tests using smartctl.

Offline

#7 2015-04-16 11:08:17

davidAK
Member
Registered: 2015-04-15
Posts: 7

Re: Pacman Stale file handle

~ ❯❯❯ sudo smartctl -a /dev/sda2
smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.19.3-3-ARCH] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     LITEONIT LMT-512L9M-11 MSATA 512GB
Serial Number:    TW0099H4550854511889
Firmware Version: HM9110B
User Capacity:    512 110 190 592 bytes [512 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ATA8-ACS, ATA/ATAPI-7 T13/1532D revision 4a
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Thu Apr 16 13:06:52 2015 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever 
					been run.
Total time to complete Offline 
data collection: 		(   10) seconds.
Offline data collection
capabilities: 			 (0x15) SMART execute Offline immediate.
					No Auto Offline data collection support.
					Abort Offline collection upon new
					command.
					No Offline surface scan supported.
					Self-test supported.
					No Conveyance Self-test supported.
					No Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   1) minutes.
Extended self-test routine
recommended polling time: 	 (  10) minutes.
SCT capabilities: 	       (0x003d)	SCT Status supported.
					SCT Error Recovery Control supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0003   100   100   000    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0003   100   100   000    Pre-fail  Always       -       2058
175 Program_Fail_Count_Chip 0x0003   100   100   000    Pre-fail  Always       -       0
176 Erase_Fail_Count_Chip   0x0003   100   100   000    Pre-fail  Always       -       0
177 Wear_Leveling_Count     0x0003   100   100   000    Pre-fail  Always       -       18930
178 Used_Rsvd_Blk_Cnt_Chip  0x0003   100   100   000    Pre-fail  Always       -       0
179 Used_Rsvd_Blk_Cnt_Tot   0x0003   100   100   000    Pre-fail  Always       -       0
180 Unused_Rsvd_Blk_Cnt_Tot 0x0033   100   100   000    Pre-fail  Always       -       1184
181 Program_Fail_Cnt_Total  0x0003   100   100   000    Pre-fail  Always       -       0
182 Erase_Fail_Count_Total  0x0003   100   100   000    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0003   100   100   000    Pre-fail  Always       -       0
195 Hardware_ECC_Recovered  0x0003   100   100   000    Pre-fail  Always       -       0
241 Total_LBAs_Written      0x0003   100   100   000    Pre-fail  Always       -       142199
242 Total_LBAs_Read         0x0003   100   100   000    Pre-fail  Always       -       86231

SMART Error Log Version: 0
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%         6         -
# 2  Short offline       Completed without error       00%         0         -
# 3  Short offline       Completed without error       00%         0         -

Selective Self-tests/Logging not supported

Offline

#8 2015-04-16 12:04:52

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,901
Website

Re: Pacman Stale file handle

You have a small number of csum errors, but because it's not part of a RAID, scrub isn't able to restore a good copy of the data (which is why they're reported as "uncorrectable" errors).

Are you able to 'rm' the /var/lib/pacman/local/gnome-shell-extension-atom-dash-git-26.472abad-1/desc file? If you can, do so, then reinstall gnome-shell-extension-atom-dash-git, if not, you may need to try a btrfs check. https://btrfs.wiki.kernel.org/index.php/Btrfsck


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#9 2015-04-16 15:06:41

davidAK
Member
Registered: 2015-04-15
Posts: 7

Re: Pacman Stale file handle

Ok, I mounted arch USB, and ran

btrfs check —— repair /dev/sda2

.

Now when I booted the system just hanged, so I force rebooted (shouldn't have done that). Now it just hangs on boot..

Error Message

Edit: not sure if the image tag is working; I'm on my phone now. The link is http://m.imgur.com/y44Tq9x

Last edited by davidAK (2015-04-16 15:08:33)

Offline

#10 2015-04-16 15:28:00

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,901
Website

Re: Pacman Stale file handle

What did --repair say?

Can you mount the partition from the liveUSB? Anything in dmesg if it fails?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#11 2015-04-16 16:15:00

davidAK
Member
Registered: 2015-04-15
Posts: 7

Re: Pacman Stale file handle

--repair printet hundreds of lines like this: http://imgur.com/7B2PMYE

I can however mount the partition from liveUSB

Offline

#12 2015-04-16 20:22:19

davidAK
Member
Registered: 2015-04-15
Posts: 7

Re: Pacman Stale file handle

Ok. I did a clean install. Had all my personal stuff on a seperate partition. This time I formated /dev/sda2 as ext4.

Thanks for taking your time WorMzy!

Do I delete this post?

Last edited by davidAK (2015-04-16 20:22:34)

Offline

#13 2015-04-16 20:48:09

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Pacman Stale file handle

davidAK wrote:

Do I delete this post?

No.  How else will others benefit from your experience?  https://wiki.archlinux.org/index.php/Fo … way_street

Thank you for asking first smile


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB