![]() ![]() So it always returns -ENOMEM, regardless of success or failure. A refactor of atalk_proc_init, which happens to be the previous commit to the one linked above, accidentally left the code in a state where it would return -ENOMEM instead of 0 on success. In particular, the return values of these functions, which were previously ignored, are now checked to ensure they succeed:įurther inspection revealed atalk_proc_init as the real culprit. This commit simply does a better job of checking return values of the functions called by atalk_init, and cleaning up properly if they fail. appletalk: Fix use-after-free in atalk_proc_exit But nevertheless, it finally settled on this commit from March 2019 being the start of the problem: I probably should have figured out a way to automate it with qemu using a strategy similar to the one used in this excellent blog post. I also used “make localmodconfig” (followed by enabling appletalk in “make menuconfig”) to speed up the compile process after I noticed that most of the compile time was being spent building kernel modules that I wouldn’t be loading anyway. Then I ran a git bisect between those versions, following the instructions on the Ubuntu wiki for bisecting upstream kernels. I narrowed the problem down to sometime between kernels 5.0 and 5.1-rc1. Next, I tried a bunch of upstream kernel versions. So this was definitely a kernel issue if I wasn’t already convinced. Sure enough, Ubuntu’s 5.0.0 kernel worked fine. Since I knew it had worked before, I tried installing various kernel versions in a VM. I finally came back and did some more troubleshooting. It’s kind of difficult to search for info about this type of problem, because hardly anybody is using the AppleTalk networking layer in Linux anymore. It failed with the exact same error.Īt this point after trying to do more research, I gave up for a while because I had more important stuff to worry about. ![]() To test my theory, I headed over to my desktop Linux machine and ran the same modprobe command. Why can’t it allocate memory? I wondered if it was something specific to this particular machine. Modprobe: ERROR: could not insert 'appletalk': Cannot allocate memoryĪha! There’s the real problem. I tried some Googling and noticed that recently AppleTalk had been patched so that you can’t create raw sockets without the CAP_NET_RAW capability, so I fiddled with setcap to set that capability on the atalkd binary, but that didn’t seem to fix anything, so I undid all the capability changes I tested.Īfter further experimentation, I realized that the appletalk kernel module wasn’t being loaded: lsmod | grep I tried to load it myself: sudo modprobe appletalk Maybe I needed to reapply the patch? But no, the netatalk binary hadn’t been updated. I had already needed to manually patch the netatalk binary due to another bug. What could have possibly changed? I was keeping up to date with all of my Ubuntu updates. Process: 1320 ExecStart=/etc/init.d/netatalk start (code=exited, status=1/FAILURE)Īug 01 10:29:36 miniserver systemd: Starting rvice…Īug 01 10:29:36 miniserver netatalk: Starting Netatalk services (this will take a while): socket: Address family not supported by protocolĪug 01 10:29:36 miniserver netatalk: socket: Address family not supported by protocolĪug 01 10:29:36 miniserver netatalk: atalkd: can't get interfaces, exiting.Īug 01 10:29:36 miniserver systemd: rvice: Control process exited, code=exited status=1Īug 01 10:29:36 miniserver systemd: rvice: Failed with result 'exit-code'.Īug 01 10:29:36 miniserver systemd: Failed to start rvice. Loaded: loaded (/etc/init.d/netatalk generated)Īctive: failed (Result: exit-code) since Sat 10:29:36 PDT 54s ago Uh oh! Why won’t netatalk start? systemctl status rvice See "systemctl status rvice" and "journalctl -xe" for details. Job for rvice failed because the control process exited with error code. Hmmm….why wouldn’t atalkd be running? I went ahead and tried to restart netatalk: sudo service netatalk restart ![]() ps ax | grep atalkdģ351 pts/0 R+ 0:00 grep -color=auto atalkd I checked out the server, and noticed that atalkd wasn’t running. Support for AppleTalk was removed in version 3.x, so that’s why I’m still using 2.x. This allows it to work with really old classic Macs that don’t even have a TCP/IP stack installed. Version 2.x, which I use, supports the ancient AppleTalk protocol. It allows other operating systems to act as Mac file servers. If you’re not familiar with netatalk, it’s an implementation of Apple Filing Protocol (AFP) that runs on Unix-like operating systems such as Linux and NetBSD. I was looking at one of my classic Macs a few weeks ago, and noticed that my Ubuntu 18.04 netatalk server wasn’t showing up in the Chooser anymore. ![]()
0 Comments
Leave a Reply. |