Skip to content

restore mark c:/ crash director with segv while mark "/c:/" not #2400

@bruno-at-bareos

Description

@bruno-at-bareos

Bareos component version

bareos version 24.0.6

Steps to reproduce

Have fileset

fileset=windows_photos
FileSet {
  Name = "windows_photos"
  Description = "photos"
  Include {
    Options {
      Signature = "XXH128"
      AclSupport = Yes
      XattrSupport = Yes
      HardLinks = No
    }
    File = "c:/temp/Photos"
  }
}

Have a backup job done with those data

list joblog jobid=21315
 2025-10-20 14:51:39 yoda-dir JobId 21315: Version: 24.0.6 (15 October 2025) SUSE Linux Enterprise Server 15 SP5
 2025-10-20 14:51:39 yoda-dir JobId 21315: Start Backup JobId 21315, Job=testtape.2025-10-20_14.51.37_58
 2025-10-20 14:51:39 yoda-dir JobId 21315: Connected Storage daemon at yoda:9103, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
 2025-10-20 14:51:39 yoda-dir JobId 21315:  Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
 2025-10-20 14:51:39 yoda-dir JobId 21315: Connected Client: bareos-pluton-fd at bareos-pluton:9102, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
 2025-10-20 14:51:39 yoda-dir JobId 21315:  Handshake: Immediate TLS
 2025-10-20 14:51:39 yoda-dir JobId 21315:  Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
 2025-10-20 14:51:39 yoda-sd JobId 21315: Using just in time reservation for job 21315
 2025-10-20 14:51:39 yoda-dir JobId 21315: Using Device "JustInTime Device" to write.
 2025-10-20 14:51:39 yoda-sd JobId 21315: Connected File Daemon at bareos-pluton:9102, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
 2025-10-20 14:51:41 yoda-sd JobId 21315: Version: 24.0.6 (15 October 2025) SUSE Linux Enterprise Server 15 SP5
 2025-10-20 14:51:39 bareos-pluton-fd JobId 21315: Created 18 wildcard excludes from FilesNotToBackup Registry key
 2025-10-20 14:51:42 bareos-pluton-fd JobId 21315: Generate VSS snapshots. Driver="Win64 VSS"
 2025-10-20 14:51:42 bareos-pluton-fd JobId 21315: VolumeMountpoints are not processed as onefs = yes.
 2025-10-20 14:51:43 bareos-pluton-fd JobId 21315: (c:\)\\?\Volume{8cbe65ce-0000-0000-0000-500600000000}\ -> \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1
 2025-10-20 14:51:43 bareos-pluton-fd JobId 21315: Version: 25.0.0~pre844.a5309fe1a (04 October 2025) Microsoft Windows Server 2012  (build 9200), 64-bit
 2025-10-20 14:51:43 yoda-sd JobId 21315: JustInTime Reservation: Finding drive to reserve.
 2025-10-20 14:51:43 yoda-sd JobId 21315: Using Device "archives" (/media/storage/backups/archives/) to write.
 2025-10-20 14:51:43 yoda-sd JobId 21315: Moving to end of data on volume "windows_photos"
 2025-10-20 14:51:43 yoda-sd JobId 21315: Ready to append to end of Volume "windows_photos" size=201
 2025-10-20 14:51:46 bareos-pluton-fd JobId 21315: VSS Writer (BackupComplete): "Task Scheduler Writer", State: 0x1 (VSS_WS_STABLE)
 2025-10-20 14:51:46 bareos-pluton-fd JobId 21315: VSS Writer (BackupComplete): "VSS Metadata Store Writer", State: 0x1 (VSS_WS_STABLE)
 2025-10-20 14:51:46 bareos-pluton-fd JobId 21315: VSS Writer (BackupComplete): "Performance Counters Writer", State: 0x1 (VSS_WS_STABLE)
 2025-10-20 14:51:46 bareos-pluton-fd JobId 21315: VSS Writer (BackupComplete): "System Writer", State: 0x1 (VSS_WS_STABLE)
 2025-10-20 14:51:46 bareos-pluton-fd JobId 21315: VSS Writer (BackupComplete): "SqlServerWriter", State: 0x1 (VSS_WS_STABLE)
 2025-10-20 14:51:46 bareos-pluton-fd JobId 21315: VSS Writer (BackupComplete): "ASR Writer", State: 0x1 (VSS_WS_STABLE)
 2025-10-20 14:51:46 bareos-pluton-fd JobId 21315: VSS Writer (BackupComplete): "Shadow Copy Optimization Writer", State: 0x1 (VSS_WS_STABLE)
 2025-10-20 14:51:46 bareos-pluton-fd JobId 21315: VSS Writer (BackupComplete): "WMI Writer", State: 0x1 (VSS_WS_STABLE)
 2025-10-20 14:51:46 bareos-pluton-fd JobId 21315: VSS Writer (BackupComplete): "Registry Writer", State: 0x1 (VSS_WS_STABLE)
 2025-10-20 14:51:46 bareos-pluton-fd JobId 21315: VSS Writer (BackupComplete): "COM+ REGDB Writer", State: 0x1 (VSS_WS_STABLE)
 2025-10-20 14:51:48 yoda-sd JobId 21315: Releasing device "archives" (/media/storage/backups/archives/).
 2025-10-20 14:51:48 yoda-sd JobId 21315: Elapsed time=00:00:07, Transfer rate=146.7 M Bytes/second
 2025-10-20 14:51:48 yoda-dir JobId 21315: Insert of attributes batch table with 103 entries start
 2025-10-20 14:51:48 yoda-dir JobId 21315: Insert of attributes batch table done
 2025-10-20 14:51:48 yoda-dir JobId 21315: Bareos yoda-dir 24.0.6 (15Oct25):
  Build OS:               SUSE Linux Enterprise Server 15 SP5
  JobId:                  21315
  Job:                    testtape.2025-10-20_14.51.37_58
  Backup Level:           Full
  Client:                 "bareos-pluton-fd" 25.0.0~pre844.a5309fe1a (04Oct25) Microsoft Windows Server 2012  (build 9200), 64-bit,Windows-x64
  FileSet:                "windows_photos" 2025-10-20 14:47:36
  Pool:                   "archives" (From command line)
  Catalog:                "mycatalog" (From Client resource)
  Storage:                "archives" (From Pool resource)
  Scheduled time:         20-Oct-2025 14:51:37
  Start time:             20-Oct-2025 14:51:39
  End time:               20-Oct-2025 14:51:48
  Elapsed time:           9 secs
  Priority:               10
  Allow Mixed Priority:   no
  FD Files Written:       104
  SD Files Written:       104
  FD Bytes Written:       1,027,368,309 (1.027 GB)
  SD Bytes Written:       1,027,387,934 (1.027 GB)
  Rate:                   114152.0 KB/s
  Software Compression:   None
  VSS:                    yes
  Encryption:             no
  Accurate:               yes
  Volume name(s):         windows_photos
  Volume Session Id:      24
  Volume Session Time:    1760598916
  Last Volume Bytes:      1,027,473,953 (1.027 GB)
  Non-fatal FD errors:    0
  SD Errors:              0
  FD termination status:  OK
  SD termination status:  OK
  Bareos binary info:     Bareos subscription release
  Job triggered by:       User
  Termination:            Backup OK

Try to do a restore

restore jobid=21315 client=bareos-pluton-fd fileset=windows_photo restorejob=DefaultRestore restoreclient=bareos-fd where=/tmp

Using Catalog "mycatalog"
You have selected the following JobId: 21315

Building directory tree for JobId(s) 21315 ...  ++++++++++++++++++++++++++++++++++
103 files inserted into the tree.

You are now entering file selection mode where you add (mark) and
remove (unmark) files to be restored. No files are initially added, unless
you used the "all" keyword on the command line.
Enter "done" to leave this mode.

cwd is: /
$ dir
----------   0 0 (root) 0 (root)             0  1970-01-01 01:00:00   c:/

Expected results

Use of

$ mark "/c:/"
104 files newly marked.

Use of

mark c:/
104 files newly marked

Actual results

Bareos dir SEGV

Environment

- OS: `Linux + Windows FD`
- component:

Relevant log output

Relevant traces output

Attempt to dump current JCRs. njcrs=2
threadid=0x00007f363980a880 killable=0 JobId=0 JobStatus=R jcr=0x5592ccdb4810 name=*JobMonitor*.2025-10-21_09.02.59_01
	UseCount=1
	JobType=I JobLevel= 
	sched_time=21-Oct-2025 09:02 start_time=21-Oct-2025 09:02
	end_time=01-Jan-1970 01:00 wait_time=01-Jan-1970 01:00
	db=(nil) db_batch=(nil) batch_started=0
threadid=0x00007f3637b126c0 killable=0 JobId=0 JobStatus=R jcr=0x7f3628014310 name=-Console-.2025-10-21_09.03.05_02
	UseCount=1
	JobType=U JobLevel= 
	sched_time=21-Oct-2025 09:03 start_time=21-Oct-2025 09:03
	end_time=01-Jan-1970 01:00 wait_time=01-Jan-1970 01:00
	db=0x7f36280079d0 db_batch=(nil) batch_started=0
BareosDb=0x7f36280079d0 db_name=bareos db_user=bareos connected=true
	cmd="SELECT FileId, LStat, MD5, Fhinfo, Fhnode FROM File WHERE File.JobId=0 AND File.PathId=6619828 AND File.Name=''" changes=0
	RWLOCK=0x7f36280079d8 w_active=0 w_wait=0
dumping of jcrs finished. number of dumped = 2

Anything else?

Seen also by zm/75494

Metadata

Metadata

Assignees

Labels

bugThis addresses a bug

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions