cp command loop when using ntfs3 package

Bug #2000626 reported by geole0
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
evince (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hello.
I'm on ubuntu 22.04, I saw that ntfs3 is supposed to correctly write to an NTFS partition.
I inform you that this is not the case.
Here is my quick test

First try on EFI computer:
I remove the NTFS-3G package to be sure not to use it.
When I detect that the cp command is no longer responding, I kill the process. Nothing is happening. I shut down the computer. During the shutdown phase, I am informed twice that the cp command is running.
On reboot, I cannot access the partition. But I succeed in read-only mode.
I run another normal ubuntu which tells me that I have to use windows to do an chkdsk
But windows refuse to start, I duplicate by the dd command the NTFS partition in a larger NTFS partition stored in an external disk.
Then I delete the NTFS partition from the internal disk.
Then I repare windows.
After restarting windows, I find that its disk space manager cannot access to the duplicate partition on external disk.
There's no answer. So no letter to do the CHKDSK command.
I decide to be more methodical in order to open a discussion and make a script to see a little what is happening.

Second try on LEGACY computer:

I make a script based on cp command.

I try it on a normal NTFS partition in NTFS-3G.
It ends perfectly well.

I restart it on the same partition mounted in NTF3
He blocks.

I make on another disk two partitions of identical size.
 I launch on one. It hangs almost in the same place.
I launch on the other.
It hangs in exactly the same place.
This makes me open the bug.
I can provide you with some information.

@b:~$ sudo df -ah |egrep "Taille|root"
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
/dev/sdb6 99G 28G 71G 29% /media/root/TestNTFS
/dev/sdd10 60G 30G 31G 50% /media/root/TestNTFS1
/dev/sdd11 60G 30G 31G 50% /media/root/TestNTFS2
a@b:~$

First disk
root@b:~# Na=0
Nb=25
time for (( I=$Na; I < $Nb; I++ )); do for (( J=$Na; J < $Nb; J++ )); do for (( K=$Na; K < $Nb; K++ )); do
echo -n -e avancement $I $J $K "\r \a";
for (( L=$Na; L < $Nb; L++ )); do mkdir -p $Rep/$I/$J/$K/$L ; for (( M=$Na; M < $Nb; M++ )); do cp FIC $Rep/$I/$J/$K/$L/$M; done; done; done; done; done
 avancement 14 3 18

Second disk
root@b:~# mount -v -t ntfs3 /dev/sdd10 /$Rep
mount: /media/root/TestNTFS1: /dev/sdd10 déjà monté sur /media/root/TestNTFS1.
root@b:~#
root@b:~# Na=0
Nb=25
time for (( I=$Na; I < $Nb; I++ )); do for (( J=$Na; J < $Nb; J++ )); do for (( K=$Na; K < $Nb; K++ )); do echo -n -e avancement $I $J $K "\r \a"; for (( L=$Na; L < $Nb; L++ )); do mkdir -p $Rep/$I/$J/$K/$L ; for (( M=$Na; M < $Nb; M++ )); do cp FIC $Rep/$I/$J/$K/$L/$M; done; done; done; done; done
  avancement 15 3 10

root@b:~# dd if=/dev/zero of=FIC count=1 bs=1K
Rep=/media/root/TestNTFS2
mkdir $Rep
mount -v -t ntfs3 /dev/sdd11 /$Rep
Na=0
Nb=25
1+0 enregistrements lus
1+0 enregistrements écrits
1024 octets (1,0 kB, 1,0 KiB) copiés, 0,000783991 s, 1,3 MB/s
mount : /dev/sdd11 monté sur /media/root/TestNTFS2.
root@b:~#
root@b:~# time for (( I=$Na; I < $Nb; I++ )); do for (( J=$Na; J < $Nb; J++ )); do for (( K=$Na; K < $Nb; K++ )); do echo -n -e avancement $I $J $K "\r \a"; for (( L=$Na; L < $Nb; L++ )); do mkdir -p $Rep/$I/$J/$K/$L ; for (( M=$Na; M < $Nb; M++ )); do cp FIC $Rep/$I/$J/$K/$L/$M; done; done; done; done; done
 avancement 15 3 10

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: evince 42.3-0ubuntu2
ProcVersionSignature: Ubuntu 5.15.0-56.62-generic 5.15.64
Uname: Linux 5.15.0-56-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu82.3
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Wed Dec 28 11:35:15 2022
EcryptfsInUse: Yes
InstallationDate: Installed on 2022-08-11 (138 days ago)
InstallationMedia: Ubuntu 20.04.2.0 LTS "Focal Fossa" - Release amd64 (20210209.1)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: evince
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
geole0 (geole0) wrote :
Revision history for this message
geole0 (geole0) wrote :

Contents of full journal logs

Revision history for this message
geole0 (geole0) wrote :

Contents of errors in the journal log
and remember

sudo smartctl -a /dev/sdb | egrep "Pending|Reallocated"
 5 Reallocated_Sector_Ct 0x0033 028 028 036 Pre-fail Always FAILING_NOW 2978
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0

Revision history for this message
geole0 (geole0) wrote :

Hello

I can't stop both processes with the Ctrl C command.
So I kill both sessions.
But I can't unmount both partitions.
I start the shutdown of the computer.
You will see in the attached chart that it is not easy for him to request the unmounts of two TestNTFSn partitions.
Especially these lines where he uses a strong way which certainly explains it becomes necessary to ask windows to work to restore.

déc. 28 19:39:44 p systemd[1]: Unmounting /media/root/TestNTFS1...
déc. 28 19:39:44 p systemd[1]: Unmounting /media/root/TestNTFS2b...
déc. 28 19:39:44 p umount[2916153]: umount: /media/root/TestNTFS1: la cible est active.
déc. 28 19:39:44 p systemd[1]: Unmounting /run/credentials/systemd-sysusers.service...
déc. 28 19:39:44 p umount[2916154]: umount: /media/root/TestNTFS2b: la cible est active.

déc. 28 19:39:36 p systemd[1]: user@1000.service: Killing process 2673471 (cp) with signal SIGKILL.
déc. 28 19:39:36 p systemd[1]: user@1000.service: Killing process 2914934 (cp) with signal SIGKILL.
déc. 28 19:39:36 p systemd[1]: user@1000.service: Deactivated successfully.
déc. 28 19:39:36 p systemd[1]: user@1000.service: Unit process 2673471 (cp) remains running after unit stopped.
déc. 28 19:39:36 p systemd[1]: user@1000.service: Unit process 2914934 (cp) remains running after unit stopped.
déc. 28 19:39:36 p systemd[1]: Stopped User Manager for UID 1000.

Revision history for this message
geole0 (geole0) wrote :

And, now the chkdsk is blocked since about one hour on the last line.

PS C:\Windows\system32> chkdsk i: /f
Le type du système de fichiers est NTFS.
Le nom de volume est TestNTFS1.

Étape 1 : Examen de la structure du système de fichiers de base...
Suppression du segment d’enregistrement de fichier endommagé 557F9E. de fin reste : 0:09:45 ...
  5603584 enregistrements de fichier traités. n reste : 0:09:45
La vérification des fichiers est terminée.
 Durée de la phase (Vérification des enregistrements de fichiers) : 4.92 minutes.
Suppression du segment d’enregistrement de fichier orphelin 557D46.
Suppression du segment d’enregistrement de fichier orphelin 557DAE.
Suppression du segment d’enregistrement de fichier orphelin 557E16.
Suppression du segment d’enregistrement de fichier orphelin 557E7E.
Suppression du segment d’enregistrement de fichier orphelin 557EE6.
Suppression du segment d’enregistrement de fichier orphelin 557F4E.
Suppression du segment d’enregistrement de fichier orphelin 557FBA.
Suppression du segment d’enregistrement de fichier orphelin 558022.
Suppression du segment d’enregistrement de fichier orphelin 55808A.
  11 enregistrements de grand fichier traités. ste : 0:09:00 .
Suppression du segment d’enregistrement de fichier orphelin 5580F2.
 Durée de la phase (Récupération des enregistrements de fichiers orphelins) : 0.00 millisecondes.
  0 enregistrements de fichier incorrect traités.  : 0:08:59 ..
 Durée de la phase (Vérification des enregistrements de fichiers incorrects) : 4.66 millisecondes.

Étape 2 : Examen de la liaison des noms de fichiers...
  1 enregistrements d’analyse traités. e : 0:03:48 0:03:50 ...
État d’avancement : 5637787 de 6051814 effectué(s) ; Étape : 93% ; Total : 74% ; Heure de fin reste : 0:04:06 .

Revision history for this message
geole0 (geole0) wrote :
Download full text (3.3 KiB)

Finally, i kill the process then
PS C:\Windows\system32> chkdsk i: /f
Le type du système de fichiers est NTFS.
Le nom de volume est TestNTFS1.

Étape 1 : Examen de la structure du système de fichiers de base...
  5603584 enregistrements de fichier traités. n reste : 0:03:45 ...
La vérification des fichiers est terminée.
 Durée de la phase (Vérification des enregistrements de fichiers) : 1.86 minutes.
  1 enregistrements de grand fichier traités. e : 0:03:41
 Durée de la phase (Récupération des enregistrements de fichiers orphelins) : 0.00 millisecondes.
  0 enregistrements de fichier incorrect traités.  : 0:03:37 .
 Durée de la phase (Vérification des enregistrements de fichiers incorrects) : 2.86 millisecondes.

Étape 2 : Examen de la liaison des noms de fichiers...
  1 enregistrements d’analyse traités. e : 0:00:43 .. 0:00:43 .
Suppression de l’entrée d’index 11 dans l’index $I30 du fichier 557BD1. de fin reste : 0:00:14 ..
  6051814 entrées d’index traitées. te : 0:00:14 ...
La vérification des index est terminée.
 Durée de la phase (Vérification de l'index) : 12.44 minutes.
CHKDSK analyse les fichiers non indexés pour les reconnecter à leur répertoire d’origine.
  15 fichiers non indexés analysés. ste : 0:01:28 .
  0 fichiers non indexés récupérés dans le répertoire d'origine.
 Durée de la phase (Reconnexion orpheline) : 0.00 millisecondes. ste : 999:00:00 ..
CHKDSK récupère les fichiers non indexés restants.
  15 fichiers non indexés récupérés dans le répertoire des fichiers perdus et trouvés.
    Le répertoire des fichiers perdus et trouvés se situe dans \found.000.

 Durée de la phase (Récupération orpheline vers éléments perdus et trouvés) : 0.00 millisecondes.
  1 enregistrements d’analyse traités. e : 999:00:00
 Durée de la phase (Vérification de l’ID d’objet et du point de réanalyse) : 34.78 millisecondes.

Étape 3 : Examen des descripteurs de sécurité...
La vérification des descripteurs de sécurité est terminée.
 Durée de la phase (Vérification du descripteur de sécurité) : 55.38 millisecondes.
  224115 fichiers de données traités. ste : 0:00:00 .
 Durée de la phase (Vérification des attributs de données) : 1.84 millisecondes.
Correction des erreurs dans l’attribut BITMAP de la table de fichiers
maîtres (MFT).
Correction des erreurs dans le carte du volume.

Windows a effectué des corrections sur le système de fichiers.
Aucune autre action n’est requise.

  83886079 Ko d’espace disque au total.
  21538268 Ko dans 5602527 fichiers.
    896488 Ko dans 224119 index.
         0 Ko dans des secteurs défectueux.
   5673039 Ko utilisés par le système.
     65536 Ko occupés par le fichier journal.
  55778284 Ko disponibles sur le disque.

      4096 octets dans chaque unité d’allocation.
  20971519 unités d’all...

Read more...

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this issue and helping to make Ubuntu better. Examining the information you have given us, this does not appear to be a bug report so we are closing it. We understand the difficulties you are facing, but it is better to raise problems you are having in the support tracker at https://answers.launchpad.net/ubuntu if you are uncertain if they are bugs. If you would prefer live chat support, you can find an IRC support channel for your flavor of Ubuntu here: https://wiki.ubuntu.com/IRC/ChannelList. You can also find help with your problem in the support forum of your local Ubuntu community http://loco.ubuntu.com/ or asking at https://askubuntu.com or https://ubuntuforums.org. For help on reporting bugs, see https://help.ubuntu.com/community/ReportingBugs.

And also the bug was reported against 'evince' which is a pdf reader but the description doesn't seem to have anything to do with pdf...

Changed in evince (Ubuntu):
status: New → Invalid
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.