Maximillian Laumeister
Illustration of Miku the bird-fox shouting through a megaphone while flying in the sky

Fixed: WordPress VVV 502 error when visiting plugins.php page

Edit 5/3/2020: Looks like VVV is now compatible with VirtualBox 6.1, so the issue in this article is no longer a problem. Awesome!

While developing a WordPress plugin using VVV, I was getting a 502 error when visiting the plugin management page at http://one.wordpress.test/wp-admin/plugins.php.

I originally posted this question on a forum, but was able to figure it out myself before the post got any traction. I’m archiving it here just in case someone else has the same issue and could stumble on this page via google search. Read below for the answer.

Answer

It turns out that VVV’s dependency, Vagrant 2.2.6, is not compatible with the newest version of VirtualBox (6.1). This causes VVV’s provisioning/execution to fail silently. VirtualBox 6.1 was released last month, so this is a new issue.

The VVV maintainers recently updated the README to reflect this.

Uninstalling VirtualBox 6.1 and installing VirtualBox 6.0 did the trick. Didn’t even need to reinstall Vagrant or VVV.

Original Question

I’ve been writing and testing my plugin using a local Varying Vagrant Vagrants (VVV) WordPress install.

Recently I reinstalled my OS, and now I’m getting an error.

When I visit the plugin management page at http://one.wordpress.test/wp-admin/plugins.php, the page displays fine, however when I add my plugin folder to wp-content/plugins, every time I try to view the same plugin management page I get a 502 Bad Gateway error. When I remove my plugin folder, the issue goes away again and I am able to view the plugin management page just fine.

With my plugin in place, I tailed the VVV system log at log/ubuntu-bionic-18.04-cloudimg-console.log, and every time I refresh the page I get a new “kernel NULL pointer dereference” error. Here is an example of the error:

[ 1537.003375] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
[ 1537.004469] IP:           (null)
[ 1537.004958] PGD 0 P4D 0 
[ 1537.005580] Oops: 0010 [#20] SMP PTI
[ 1537.006102] Modules linked in: vboxsf isofs crct10dif_pclmul crc32_pclmul ghash_clmulni_intel input_leds serio_raw video vboxguest sch_fq_codel ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear aesni_intel aes_x86_64 crypto_simd cryptd glue_helper psmouse mptspi scsi_transport_spi mptscsih mptbase e1000
[ 1537.011979] CPU: 0 PID: 4233 Comm: php-fpm7.2 Tainted: G      D          4.15.0-74-generic #84-Ubuntu
[ 1537.013109] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
[ 1537.014105] RIP: 0010:          (null)
[ 1537.014592] RSP: 0018:ffffb996c0bd7c20 EFLAGS: 00010246
[ 1537.015236] RAX: ffffffffc0812180 RBX: ffffb996c0bd7cd0 RCX: 0000000000000000
[ 1537.016100] RDX: ffffb996c0bd7d38 RSI: ffff9af7796237c0 RDI: ffff9af77b29c240
[ 1537.016949] RBP: ffffb996c0bd7c58 R08: 0000000000000000 R09: 000000005e31fcd2
[ 1537.017811] R10: ffffeee0c1f02540 R11: 0000000000000216 R12: 0000000000000000
[ 1537.018695] R13: ffffb996c0bd7d38 R14: ffff9af7796237c0 R15: ffff9af77b29c240
[ 1537.019670] FS:  00007f6a6d873a00(0000) GS:ffff9af77fc00000(0000) knlGS:0000000000000000
[ 1537.020818] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1537.021564] CR2: 0000000000000000 CR3: 000000007a94a003 CR4: 00000000000606f0
[ 1537.022424] Call Trace:
[ 1537.022776]  trailing_symlink+0x165/0x220
[ 1537.023301]  path_lookupat+0x90/0x1f0
[ 1537.023981]  filename_lookup+0xb6/0x190
[ 1537.024811]  ? strncpy_from_user+0x4d/0x150
[ 1537.025421]  user_path_at_empty+0x36/0x40
[ 1537.025940]  ? user_path_at_empty+0x36/0x40
[ 1537.026490]  vfs_statx+0x76/0xe0
[ 1537.026940]  SYSC_newstat+0x3d/0x70
[ 1537.027449]  SyS_newstat+0xe/0x10
[ 1537.027921]  do_syscall_64+0x73/0x130
[ 1537.028435]  entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[ 1537.029105] RIP: 0033:0x7f6a6b121775
[ 1537.029617] RSP: 002b:00007ffd1fcdf678 EFLAGS: 00000246 ORIG_RAX: 0000000000000004
[ 1537.030574] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f6a6b121775
[ 1537.031498] RDX: 00007ffd1fcdf800 RSI: 00007ffd1fcdf800 RDI: 00007f6a4e950438
[ 1537.032357] RBP: 00007f6a4e950438 R08: 000000000000ffff R09: 0000000000000000
[ 1537.033206] R10: 00007f6a6b19f460 R11: 0000000000000246 R12: 0000000000000000
[ 1537.034054] R13: 00007ffd1fcdf800 R14: 0000000000000004 R15: 0000000000000000
[ 1537.034921] Code:  Bad RIP value.
[ 1537.035365] RIP:           (null) RSP: ffffb996c0bd7c20
[ 1537.036008] CR2: 0000000000000000
[ 1537.036472] ---[ end trace 539b28e9a2689b65 ]---

This setup was working before I reinstalled my OS (and Vagrant, VVV, and VirtualBox), so I have a feeling that a newer version of one of those tools is causing this issue.

Neither the PHP nor Nginx logs seem to have anything related.

How do I start to go about debugging this?

Comments