Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail on Illumos/Solaris #646

Closed
olcai opened this Issue Apr 22, 2015 · 4 comments

Comments

Projects
None yet
5 participants
@olcai
Copy link

olcai commented Apr 22, 2015

I'm trying to run Prometheus under Illumos/Solaris (SmartOS, really), and while it is possible to build the project, two tests fail for me when running make test:

=== RUN TestTargetPoolReplaceTargets
--- FAIL: TestTargetPoolReplaceTargets (0.00s)
        targetpool_test.go:162: newTarget2 channel same as oldTarget2's
FAIL
FAIL    _/root/prometheus/retrieval     0.325s
=== RUN TestLocking
--- FAIL: TestLocking (0.00s)
        flock_test.go:37: File "/tmp/test_flock938114467/LOCK" locked twice.
FAIL
FAIL    _/root/prometheus/storage/local/flock   0.007s

I don't quite see why the targetpool_test one fails, but the lock test is more intriguing. I see that there is support for Solaris in storage/local/flock/flock_solaris.go, so I'm wondering if there is something in the build setup that makes it build the wrong version.

I'm using go version 1.4.2, with GCC 4.7.3 as the C compiler. Any pointers on why these tests fail and if I can debug them somehow?

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Apr 22, 2015

That's interesting.

I've copied the flock code from the Go leveldb implementation, but never tried it myself. So it's perfectly possible to be broken on Solaris. I think the TestTargetPoolReplaceTargets test is flaky, anyway. But for the lock it would be interesting to get more insights. No clue where to start the search, though...

@brian-brazil brian-brazil added the bug label Dec 16, 2015

@fabxc fabxc added kind/bug and removed bug labels Apr 28, 2016

@gfrey

This comment has been minimized.

Copy link

gfrey commented Feb 9, 2017

From what I understand fcntl locks files between processes, not inside a single process.

I only see one use of the flock.New where the error reads like "Prometheus already running?". This sounds more like locking between processes and if that is the case, the solaris implementation is working perfectly fine (tested with a simple program that locks a file, sleeps a few seconds and releases the lock, that I started twice in parallel).

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jul 14, 2017

None of the Prometheus developers use Solaris and this has been sitting here for 2 years, so it's unlikely this will ever get fixed by us. If there is something remaining to be fixed here, a PR would be appreciated.

simonpasquier pushed a commit to simonpasquier/prometheus that referenced this issue Oct 12, 2017

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.