jmurzy / jmurzy/codesearch

cindex fails with mmap errors on OpenBSD

Open
#29 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
Go
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
Trying to run codesearch on OpenBSD -current amd64 with go 1.0.3 from packages,
using current codesearch code fetched with 'go get', I'm seeing this:

$ go run src/code.google.com/p/codesearch/cmd/cindex/cindex.go /usr/src
2013/03/04 10:52:52 index /usr/src
2013/03/04 10:56:11 flush index
2013/03/04 10:56:12 merge 13 files + mem
2013/03/04 10:56:12 mmap /tmp/csearch-index060279584: errno 4967816
exit status 1

If I run tests I get this,

=== RUN TestMerge
2013/03/04 11:11:32 merge 0 files + mem
2013/03/04 11:11:32 99 data bytes, 1217 index bytes
2013/03/04 11:11:33 merge 0 files + mem
2013/03/04 11:11:33 87 data bytes, 1217 index bytes
2013/03/04 11:11:33 mmap /tmp/index-test259895843: errno 5172144
exit status 1
FAIL code.google.com/p/codesearch/index 0.411s

The errno seems strange, any suggestions what might be happening? OpenBSD does
not have UBC so I'm wondering if it may require msync (not sure if cindex is
mixing access via standard file operations and mmap, but if so, it will need
msyncs between the different types of access).
```

Original issue reported on code.google.com by `s...@spacehopper.org` on 4 Mar 2013 at 11:19

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure through src/code.google.com/p/codesearch/cmd/cindex/cindex.go on OpenBSD, then run the index package's TestMerge described in the report. Inspect the mmap path involved in the temporary index files and determine what makes the OpenBSD errno invalid. Done means cindex completes and the index tests pass on OpenBSD.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
operating-systems, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.