riverrun

riverrun

I am the maintainer of Comeonin (and its password hashing dependencies).

Several users are having problems deploying argon2_elixir, as can be seen in this issue. It seems that there are no problems with bcrypt_elixir.

If anyone is successfully deploying argon2_elixir, we would love to hear from you :slight_smile: Hopefully, you can help resolve this issue.

Showing Posts 1 to 10

acrolink

acrolink

I managed to compile it after updating Erlang / OPT to version 20.

Deithrian

Deithrian

The problem people are reporting is that their dev builds work, but the production build doesn’t, and it seems they’re using Distillery. :slight_smile:

bitwalker

bitwalker

Leader

Just want to chime in and say that I’ve reviewed the thread, and I don’t believe the issue lies with Distillery. If there was a general issue with NIFs, we’d see it in other cases, but we don’t. Rather curiously, even between two very similar libraries (bcrypt_elixir and argon2_elixir), only the latter exhibits this behaviour. I’m suspicious that there is something wrong with the NIF code itself, but I haven’t had time to look at it, but the error definitely seems to indicate that the NIF is violating some invariant.

Deithrian

Deithrian

Can someone explain why would a dev build work, but a prod release fail please?
It really bothers me in a “Can I depend on this thing” kind a way :slight_smile:

OvermindDL1

OvermindDL1

Many reasons, like if it builds a nif but not storing it in priv, not getting compiled, not getting copied into the release, etc… etc…

Deithrian

Deithrian

Wonderful :slight_smile:
Is this a Distillery specific problem or release problem in general?

OvermindDL1

OvermindDL1

Releases in general, they are designed to be small packed distributions with no extra stuff. :slight_smile:
It’s not even a problem, it is just by design, just all libraries should do things right or they break, expectedly. ^.^

bitwalker

bitwalker

Leader

You’re making the assumption that this is even caused by releases in the first place. Based on that thread, it’s not clear to me whether people are running into this issue because they are taking a release and dropping it on another host which is missing system dependencies, or same OS but different kernel versions, or different versions of ERTS. When it comes to NIFs, extra care is required, this is a downside of using NIFs, but the tradeoff of course is better performance. You have to make sure your dev and prod machines match OS, compatible kernel versions, matching system dependencies and versions (i.e. musl/libc, OpenSSL, etc.), and ensure that the NIF is compiled for a target triple which matches the host (i.e. deploying something compiled for a specific CPU will almost certainly break if dropped somewhere else, but typically targets aren’t specified to that degree unless you are compiling for embedded devices).

If all of these things have been covered and there is still an issue, then either the NIF is written incorrectly, or there is a new edge case related to releases and NIFs. There are a very large number of projects deploying via Distillery/using releases, and I suspect the vast majority of them use at least one NIF - so if this was an issue with Distillery specifically, or even releases more generally, we would expect to have seen this come up already. Since that isn’t the case, I’m very suspicious that either one of the prerequisites have been missed, or there is a fundamental issue with the NIF itself, and based on the error we see, it could be either one of them. While I won’t be so foolish as to say that releases are infallible, they are certainly reliable enough that questioning them should be near the end of your list of suspects, just above Erlang/OTP itself.

Releases are a fundamental part of Erlang/OTP, and have been around since the very beginning - they’ve had over 20 years of use to uncover issues and get them resolved. Distillery itself is obviously newer than that, but has been around in some form or another for the past 4+ years and has seen a pretty wide array of deployments itself, we certainly would know if there was a reliability issue with NIFs by now :wink:

riverrun

riverrun OP

Quick update: I have made changes to the Makefile (removed some of the optimization options), and I’m waiting for feedback on those changes.

riverrun

riverrun OP

Problem solved :smile:

Simplifying the Makefile, along with a couple of other minor changes to the NIF code, (in version 1.2.13) seems to have solved the problem.

If anyone here was having issues creating a release, please update to 1.2.13.

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apz
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews