'I have Segmentation fault when I made insert/update blob in postgres and Ruby

I have an odd issue with a Ruby system.

Im working over Windows, I have installed rails 7.0.3 and using Postgres 13.

Im developing a simple blog and all is fine until I add an image with Active Storage.

I can notice that ONLY when is executed an update/insert into blob table (active_storage_blobs) the server crashes with "Segmentation fault".

This is the console error trace:

Started GET "/rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhiVGgzWTJock5IWjVOR1l6YVdKdmJtTnZhR1l6TTIxa2IySnFjQVk2QmtWVU9oQmthWE53YjNOcGRHbHZia2tpWTJsdWJHbHVaVHNnWm1sc1pXNWhiV1U5SW5Cc1lYUnBiR3h2TFdGbWFXeHBZWEl0Wlcxd2NtVnpZUzV3Ym1jaU95Qm1hV3hsYm1GdFpTbzlWVlJHTFRnbkozQnNZWFJwYkd4dkxXRm1hV3hwWVhJdFpXMXdjbVZ6WVM1d2JtY0dPd1pVT2hGamIyNTBaVzUwWDNSNWNHVkpJZzVwYldGblpTOXdibWNHT3daVU9oRnpaWEoyYVdObFgyNWhiV1U2Q214dlkyRnMiLCJleHAiOiIyMDIyLTA1LTIzVDE3OjIwOjEyLjQwMVoiLCJwdXIiOiJibG9iX2tleSJ9fQ==--56b519b58ccd4203a56c7c87d605a4a69153fa20/platillo-afiliar-empresa.png" for 127.0.0.1 at 2022-05-23 12:15:12 -0500
[ActiveJob] [ActiveStorage::AnalyzeJob] [37f30828-ff52-4c65-9144-be30425a7700]   ActiveStorage::Blob Load (0.3ms)  SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = $1 LIMIT $2  [["id", 42], ["LIMIT", 1]]
[ActiveJob] [ActiveStorage::AnalyzeJob] [37f30828-ff52-4c65-9144-be30425a7700] Performing ActiveStorage::AnalyzeJob (Job ID: 37f30828-ff52-4c65-9144-be30425a7700) from Async(default) enqueued at 2022-05-23T17:15:12Z with arguments: #<GlobalID:0x0000029e8ce86d40 @uri=#<URI::GID gid://dummy/ActiveStorage::Blob/42>>
[ActiveJob] [ActiveStorage::AnalyzeJob] [37f30828-ff52-4c65-9144-be30425a7700]   Disk Storage (4.2ms) Downloaded file from key: m8wchk4vy4f3iboncohf33mdobjp
Processing by ActiveStorage::DiskController#show as PNG
  Parameters: {"encoded_key"=>"[FILTERED]", "filename"=>"platillo-afiliar-empresa"}
Completed 200 OK in 1ms (ActiveRecord: 0.0ms | Allocations: 203)


[ActiveJob] [ActiveStorage::AnalyzeJob] [37f30828-ff52-4c65-9144-be30425a7700]   TRANSACTION (0.3ms)  BEGIN
[ActiveJob] [ActiveStorage::AnalyzeJob] [37f30828-ff52-4c65-9144-be30425a7700]   ActiveStorage::Blob Update (0.7ms)  UPDATE "active_storage_blobs" SET "metadata" = $1 WHERE "active_storage_blobs"."id" = $2  [["metadata", "{\"identified\":true,\"width\":890,\"height\":472,\"analyzed\":true}"], ["id", 42]]
[ActiveJob] [ActiveStorage::AnalyzeJob] [37f30828-ff52-4c65-9144-be30425a7700]   TRANSACTION (0.9ms)  COMMIT
[ActiveJob] [ActiveStorage::AnalyzeJob] [37f30828-ff52-4c65-9144-be30425a7700] Performed ActiveStorage::AnalyzeJob (Job ID: 37f30828-ff52-4c65-9144-be30425a7700) from Async(default) in 78.82ms
Segmentation fault

Any idea?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source