Bug 2188210

Summary: uwsgi: uwsgi-plugin-ruby is unusable, not ported to current Ruby
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: uwsgiAssignee: Ralf Ertzinger <redhat-bugzilla>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: kad, python-packagers-sig, redhat-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: uwsgi-2.0.21-7.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-01 02:32:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2137512    

Description Florian Weimer 2023-04-20 06:16:22 UTC
uwsgi-plugin-ruby-2.0.21-5.fc38.x86_64 cannot be used because the ruby19 plugin cannot be loaded.

Reproducible: Always

Steps to Reproduce:
1. uwsgi --plugins ruby19 -s :3031 -M -p 4 -m --post-buffering 4096 --rack config.ru

Actual Results:  
!!! UNABLE to load uWSGI plugin: /usr/lib64/uwsgi/ruby19_plugin.so: undefined symbol: rb_obj_taint !!!


Expected Results:  
Something else, maybe an error message about the --rack argument?

Comment 1 Ralf Ertzinger 2023-04-20 07:53:09 UTC
I'm a bit puzzled as to how this ever built against any ruby 3.2.0 package in the first place.

In any case, some reading of the ruby side seems to indicate that these functions haven't done anything since ruby 2.7, so I'll gate that out.

Comment 2 Florian Weimer 2023-04-20 08:00:59 UTC
(In reply to Ralf Ertzinger from comment #1)
> I'm a bit puzzled as to how this ever built against any ruby 3.2.0 package
> in the first place.

GCC allows calling undeclared functions.  We are trying to change that for Fedora 39/40, which is why DJ discovered this issue.

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>

Comment 3 Fedora Update System 2023-04-22 17:38:36 UTC
FEDORA-2023-eeb6beec79 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-eeb6beec79

Comment 4 Florian Weimer 2023-04-22 18:26:35 UTC
(In reply to Fedora Update System from comment #3)
> FEDORA-2023-eeb6beec79 has been submitted as an update to Fedora 38.
> https://bodhi.fedoraproject.org/updates/FEDORA-2023-eeb6beec79

Looks like this fixed the rack plugin, but not the ruby19 plugin?

usr/lib64/ruby -I/usr/lib64/ruby/plugins/ruby19/../rack/rack_plugin.c: In function ‘rack_hack_dollar_zero’:
plugins/ruby19/../rack/rack_plugin.c:462:9: warning: implicit declaration of function ‘rb_obj_taint’; did you mean ‘rb_obj_id’? [-Wimplicit-function-declaration]
  462 |         rb_obj_taint(ur.dollar_zero);
      |         ^~~~~~~~~~~~
      |         rb_obj_id

Comment 5 Ralf Ertzinger 2023-04-22 19:04:24 UTC
Oh shoot.
The way this is built is a bit strange, the ruby plugin doesn't have any actual code, just build instructions which reference the rack code, but the ruby side isn't setting the flags that would disable that call.
I'll build a new version.

Comment 6 Fedora Update System 2023-04-22 20:02:06 UTC
FEDORA-2023-8d041c38ea has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-8d041c38ea

Comment 7 Florian Weimer 2023-04-22 20:17:42 UTC
(In reply to Fedora Update System from comment #6)
> FEDORA-2023-8d041c38ea has been submitted as an update to Fedora 38.
> https://bodhi.fedoraproject.org/updates/FEDORA-2023-8d041c38ea

With this version, there are no implicit function declarations left (as verified with an instrumented compiler). Thanks!

Do you plan to upstream the patch?

Comment 8 Fedora Update System 2023-04-23 02:33:36 UTC
FEDORA-2023-8d041c38ea has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-8d041c38ea`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-8d041c38ea

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2023-05-01 02:32:31 UTC
FEDORA-2023-8d041c38ea has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.