-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Type: DefectIncorrect behavior (e.g. crash, hang)Incorrect behavior (e.g. crash, hang)
Description
System information
| Type | Version/Name |
|---|---|
| Distribution Name | Debian |
| Distribution Version | 11 |
| Kernel Version | 5.10.0-9-amd64 |
| Architecture | x86_64 |
| OpenZFS Version | c9d62d1 or so |
Describe the problem you're observing
(I'll go figure out a "correct" handling for this later, I just wanted to mention it in case I forgot after I ran into it...)
I tried to examine a child dataset under a dataset named "1M", at the top of a pool, "lz4newtestpool".
# sudo zdb -dbdbdbdbdbdb lz4newtestpool/1M/largefiles 256
failed to hold objset 1: Invalid argument
zdb: can't open 'lz4newtestpool/1M/largefiles': Invalid argument
But if I rename 1M to sigh1M, it works as expected.
I would presume this is due to:
Lines 8525 to 8539 in 510885a
| char *endptr; | |
| errno = 0; | |
| objset_id = strtoull(objset_str, &endptr, 0); | |
| /* dataset 0 is the same as opening the pool */ | |
| if (errno == 0 && endptr != objset_str && | |
| objset_id != 0) { | |
| target_is_spa = B_FALSE; | |
| dataset_lookup = B_TRUE; | |
| } else if (objset_id != 0) { | |
| printf("failed to open objset %s " | |
| "%llu %s", objset_str, | |
| (u_longlong_t)objset_id, | |
| strerror(errno)); | |
| exit(1); | |
| } |
since patching the second check to not exit(1) and reset objset_id to -1 allows us to proceed, albeit having printed the error.
Describe how to reproduce the problem
sudo zdb -d pool/1zzz
Include any warning/errors/backtraces from the system logs
GOTO 10
Metadata
Metadata
Assignees
Labels
Type: DefectIncorrect behavior (e.g. crash, hang)Incorrect behavior (e.g. crash, hang)