Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: casenorm/mixed_create_failure #11

Open
lundman opened this issue Sep 17, 2020 · 0 comments
Open

panic: casenorm/mixed_create_failure #11

lundman opened this issue Sep 17, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@lundman
Copy link
Contributor

lundman commented Sep 17, 2020

This is a relatively new bug, since rebase with upstream around Aug. Unsure why it only affects macOS, when all the interaction is in the shared source files. (not macOS specific files).

It appears to add a zap, then grow the zap forever, until memory requirements break.

                 *1000  VNOP_CREATE + 95 (kernel.development + 5105071) [0xffffff80006de5af]
                   *1000  zfs_vnop_create + 222 (zfs_vnops_osx.c:1363,10 in zfs + 1681006) [0xffffff7f831ca66e]
                     *1000  zfs_create + 1744 (zfs_vnops.c:1437,11 in zfs + 1630432) [0xffffff7f831be0e0]
                       *1000  zfs_link_create + 541 (zfs_dir.c:815,10 in zfs + 1436829) [0xffffff7f8318ec9d]
                         *1000  zap_add + 155 (zap_micro.c:1274,8 in zfs + 1319387) [0xffffff7f831721db]
                           *1000  zap_add_impl + 159 (zap_micro.c:1238,9 in zfs + 1319567) [0xffffff7f8317228f]
                             *1000  fzap_add + 112 (zap.c:885,10 in zfs + 1284912) [0xffffff7f83169b30]
                               *1000  fzap_add_cd + 282 (zap.c:856,9 in zfs + 1283178) [0xffffff7f8316946a]
                                 *1000  zap_expand_leaf + 345 (zap.c:659,10 in zfs + 1283785) [0xffffff7f831696c9]
                                   *1000  zap_grow_ptrtbl + 439 (zap.c:391,11 in zfs + 1292455) [0xffffff7f8316b8a7]
                                     *565  zap_table_grow + 588 (zap.c:212,2 in zfs + 1293948) [0xffffff7f8316be7c]
                                       *541  dmu_buf_hold + 155 (dmu.c:243,9 in zfs + 222939) [0xffffff7f830666db]
                                         *541  dbuf_read + 977 (dbuf.c:1658,9 in zfs + 162177) [0xffffff7f83057981]

We essentially never leave fzap_add_cd()

The loop appears to be:

fzap_add_cd(zap_name_t *zn,
    uint64_t integer_size, uint64_t num_integers,
    const void *val, uint32_t cd, void *tag, dmu_tx_t *tx)
{
/* ... */
retry:
/* ... */
    err = zap_entry_create(l, zn, cd,
        integer_size, num_integers, val, &zeh);
/* ... */
    } else if (err == EAGAIN) {
        printf("EAGAIN\n");
        err = zap_expand_leaf(zn, l, tag, tx, &l);
        if (err == 0) {
            printf("err %d - retry\n", err);
            goto retry;

storing 815 at index 132ea3
returning 0 due to end
err 0 - retry
zap_leaf_phys(l)->l_hdr.lh_nfree 2 < numchunks 3
EAGAIN
finished; numblocks now 2048 (4096k entries)

and, the reason zap_entry_create() returns EAGAIN is:

    if (zap_leaf_phys(l)->l_hdr.lh_nfree < numchunks) {
	printf("zap_leaf_phys(l)->l_hdr.lh_nfree %d < numchunks %d\n",
            zap_leaf_phys(l)->l_hdr.lh_nfree, numchunks);
        return (SET_ERROR(EAGAIN));
    }
zap_leaf_phys(l)->l_hdr.lh_nfree 2 < numchunks 3 
zap_leaf_phys(l)->l_hdr.lh_nfree 2 < numchunks 3
zap_leaf_phys(l)->l_hdr.lh_nfree 2 < numchunks 3
zap_leaf_phys(l)->l_hdr.lh_nfree 2 < numchunks 3
These numbers don't appear to change, even as the leaf grows

and the reason zap_expand_leaf() returns 0, is from the end of the function. (Not the one earlier return 0).

@lundman lundman added the bug Something isn't working label Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant