[Bug] android docs search crashes on WSL: MappedMemoryUtils.isLoaded0 IOException (mincore not implemented)
Affected Skill
devtools (Android CLI docs search command)
Description
Running android docs search "MediaCodec" on WSL crashes with a Lucene mmap prefetch IOException. The stack trace shows the failure originates from MappedMemoryUtils.isLoaded0 (native), called via MemorySegmentIndexInput.prefetch. The underlying syscall (mincore) is not implemented on the WSL kernel, so JDK throws java.io.IOException: Function not implemented.
Expected Behavior
android docs search <query> should return search results, or gracefully degrade when mmap prefetch is unsupported.
Actual Behavior
The CLI crashes after the index is built successfully (5174 items indexed), before returning any results:
java.io.IOException: Function not implemented at java.base/java.nio.MappedMemoryUtils.isLoaded0(Native Method) at java.base/java.nio.MappedMemoryUtils.isLoaded(Unknown Source) ... at org.apache.lucene.store.MemorySegmentIndexInput.prefetch(MemorySegmentIndexInput.java:351) at org.apache.lucene.codecs.lucene90.blocktree.SegmentTermsEnumFrame.prefetchBlock(...)
Steps to Reproduce
- Environment: WSL2 on Windows 11, kernel
4.4.0-26100-Microsoft(already updated viawsl --update) - Android CLI version: 1.0.16261425
- Run:
android docs search "MediaCodec" - Observe the IOException crash after the knowledge base finishes downloading/building the index
Source: android/skills