Bug 15077

Summary: AB-INT: unfs couldn't bind to tcp port 3049
Product: [QA/Testing] Runtime Testing Reporter: Alexandre Belloni <alexandre.belloni>
Component: oeqa/runtimeAssignee: Alexander Kanavin <alex.kanavin>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: alex.kanavin, alexandre.belloni, randy.macleod, richard.purdie
Version: unspecified   
Target Milestone: 4.3 M1   
Hardware: x86   
OS: Multiple   
Whiteboard: AB-INT AB-HAVE-PLAN
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Alexandre Belloni 2023-03-23 14:19:41 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/53/builds/6859/steps/19/logs/stdio

qemuarm fedora37-ty-3


Starting User Mode nfsd
  /home/pokybuild/yocto-worker/qemuarm/build/build-st-866746/tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/pseudo -P /home/pokybuild/yocto-worker/qemuarm/build/build-st-866746/tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr /home/pokybuild/yocto-worker/qemuarm/build/build-st-866746/tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/unfsd -p -i /home/pokybuild/.runqemu-sdk/nfs0.pid -e /home/pokybuild/.runqemu-sdk/exports0 -n 3049 -m 3048
bind: Address already in use
Couldn't bind to tcp port 3049
Error starting nfsd
Comment 4 Alexander Kanavin 2023-06-14 07:20:30 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/145/builds/34

scripts/runqemu-export-rootfs should be altogether refactored to not hardcode 3049, as this is racy and causes clashes. 

meta/ib/oeqa/utils/nfs.py does it better: pick a random available port.

Also, it should use randomly generated file paths to avoid races there as well.