Reduce the incidence of SEGV. #26

Closed
phoepsilonix wants to merge 1 commit from fix-segv into master
phoepsilonix commented 2025-01-25 03:00:25 +00:00 (Migrated from gitlab2.manjaro.org)

Change svg conversion process.
Instead of converting svg inside python, an external command is executed in a separate process to convert it to png, which is then converted to pixbuf.
Use rsvg-convert, which is faster than cairosvg command.
rsvg-convert is included in package librsvg, which is required by appstream, gtk3, gtk4, etc., so it is expected that it is already installed.

Change svg conversion process. Instead of converting svg inside python, an external command is executed in a separate process to convert it to png, which is then converted to pixbuf. Use rsvg-convert, which is faster than cairosvg command. rsvg-convert is included in package librsvg, which is required by appstream, gtk3, gtk4, etc., so it is expected that it is already installed.
phoepsilonix commented 2025-01-25 03:00:26 +00:00 (Migrated from gitlab2.manjaro.org)

assigned to @phoepsilonix

assigned to @phoepsilonix
phoepsilonix commented 2025-01-25 03:06:27 +00:00 (Migrated from gitlab2.manjaro.org)

mentioned in merge request manjaro-hello!115

mentioned in merge request manjaro-hello!115
phoepsilonix commented 2025-01-25 03:08:47 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 70503bd0 - SEGV measures for librsvg, removing pillow and making only cairosvg as a dependency.

Compare with previous version

added 1 commit <ul><li>70503bd0 - SEGV measures for librsvg, removing pillow and making only cairosvg as a dependency.</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4510&start_sha=65e939067cdb3ee215019762d541bfceda99f2a8)
phoepsilonix commented 2025-01-25 03:55:32 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • f7fd3b45 - SEGV measures for librsvg, removing pillow and making only cairosvg as a dependency.

Compare with previous version

added 1 commit <ul><li>f7fd3b45 - SEGV measures for librsvg, removing pillow and making only cairosvg as a dependency.</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4514&start_sha=70503bd0f5134fc7244c1e7a1fda1572a5b7013a)
phoepsilonix commented 2025-01-25 04:18:13 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 3a49e165 - Reduce the incidence of SEGV.

Compare with previous version

added 1 commit <ul><li>3a49e165 - Reduce the incidence of SEGV.</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4516&start_sha=f7fd3b45b7148561b1d58d021d04a42f5c346d2c)
phoepsilonix commented 2025-01-25 04:47:19 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 66a8ea31 - Reduce the incidence of SEGV.

Compare with previous version

added 1 commit <ul><li>66a8ea31 - Reduce the incidence of SEGV.</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4517&start_sha=3a49e165eb594f14e14b2a5f1470c76f8d348da4)
phoepsilonix commented 2025-01-25 05:02:15 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 331ae5bc - again: convert_svg_to_pixbuf

Compare with previous version

added 1 commit <ul><li>331ae5bc - again: convert_svg_to_pixbuf</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4519&start_sha=66a8ea311c5f32e096180a7f163c5f36326ed76a)
phoepsilonix commented 2025-01-25 05:02:59 +00:00 (Migrated from gitlab2.manjaro.org)

marked this merge request as draft

marked this merge request as **draft**
phoepsilonix commented 2025-01-25 05:02:59 +00:00 (Migrated from gitlab2.manjaro.org)

changed title from {-remove python-pillow-} to {+Draft: Reduce SEGV+}

changed title from **{-remove python-pillow-}** to **{+Draft: Reduce SEGV+}**
phoepsilonix commented 2025-01-25 05:02:59 +00:00 (Migrated from gitlab2.manjaro.org)

changed the description

changed the description
phoepsilonix commented 2025-01-25 05:03:18 +00:00 (Migrated from gitlab2.manjaro.org)

changed title from Draft: Reduce SEGV to Draft: Reduce {+the incidence of +}SEGV{+.+}

changed title from **Draft: Reduce SEGV** to **Draft: Reduce {+the incidence of +}SEGV{+.+}**
phoepsilonix commented 2025-01-25 06:03:55 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 080690b0 - add svg_lock for thread safe

Compare with previous version

added 1 commit <ul><li>080690b0 - add svg_lock for thread safe</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4521&start_sha=331ae5bc809fb286213c6fd474b17502afd57400)
phoepsilonix commented 2025-01-25 06:07:54 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 95533593 - add svg_lock for thread safe

Compare with previous version

added 1 commit <ul><li>95533593 - add svg_lock for thread safe</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4522&start_sha=080690b008226ab74637a0b718b5e3a19c37a83c)
phoepsilonix commented 2025-01-25 07:43:06 +00:00 (Migrated from gitlab2.manjaro.org)

added 2 commits

  • ed945126 - add try block: get_pixbuf
  • e6c2e890 - remove comment out

Compare with previous version

added 2 commits <ul><li>ed945126 - add try block: get_pixbuf</li><li>e6c2e890 - remove comment out</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4523&start_sha=95533593a1ae931bd9acb6b462c510557a2a0652)
phoepsilonix commented 2025-01-25 08:53:53 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 1272e48c - change import order: PIL

Compare with previous version

added 1 commit <ul><li>1272e48c - change import order: PIL</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4525&start_sha=e6c2e8900fa08363a2829bb473c4c0f661e8b529)
phoepsilonix commented 2025-01-25 08:57:58 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 8b43d7dc - Just to be sure, let's treat the entire icon_data_func as thread-safe.

Compare with previous version

added 1 commit <ul><li>8b43d7dc - Just to be sure, let&#39;s treat the entire icon_data_func as thread-safe.</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4526&start_sha=1272e48c88369b2790bcbe827448c2e1d2bee2d7)
phoepsilonix commented 2025-01-25 09:03:34 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 781333d5 - remove cairosvg

Compare with previous version

added 1 commit <ul><li>781333d5 - remove cairosvg</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4527&start_sha=8b43d7dcf5ab51b539bcac0ccdf79d5e0444c93a)
phoepsilonix commented 2025-01-25 09:16:13 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • b9d87c5e - add import cairosvg

Compare with previous version

added 1 commit <ul><li>b9d87c5e - add import cairosvg</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4528&start_sha=781333d5d99de2a456dbefdbea4367b50ce58fd5)
phoepsilonix commented 2025-01-25 09:28:31 +00:00 (Migrated from gitlab2.manjaro.org)

I believe that I have been able to reduce the frequency of SEGV occurrences, although I cannot prevent it completely.
A dependency on python-cairosvg is required.

I believe that I have been able to reduce the frequency of SEGV occurrences, although I cannot prevent it completely. A dependency on python-cairosvg is required.
phoepsilonix commented 2025-01-25 09:29:27 +00:00 (Migrated from gitlab2.manjaro.org)

marked this merge request as ready

marked this merge request as **ready**
phoepsilonix commented 2025-01-25 09:29:27 +00:00 (Migrated from gitlab2.manjaro.org)

requested review from @fhdk

requested review from @fhdk
fhdk commented 2025-01-25 10:18:13 +00:00 (Migrated from gitlab2.manjaro.org)

Let us wait and see how responses are to the update that was done yesterday.

  • manjaro-hello 0.8.0
  • application-utility 1.4.1
Let us wait and see how responses are to the update that was done yesterday. - manjaro-hello 0.8.0 - application-utility 1.4.1
phoepsilonix commented 2025-01-25 13:50:10 +00:00 (Migrated from gitlab2.manjaro.org)

I agree.
That's good.

But I think We should do the Manjaro-Hello locale fix.
applications/manjaro-hello#47

I agree. That's good. But I think We should do the Manjaro-Hello locale fix. applications/manjaro-hello#47
phoepsilonix commented 2025-01-25 19:12:40 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 23bfefd7 - Add svg to pixbuf function using rsvg_converter(external commands)

Compare with previous version

added 1 commit <ul><li>23bfefd7 - Add svg to pixbuf function using rsvg_converter(external commands)</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4530&start_sha=b9d87c5e6460479bb0a5caa434b241ec478923ee)
phoepsilonix commented 2025-01-25 19:19:07 +00:00 (Migrated from gitlab2.manjaro.org)

changed the description

changed the description
phoepsilonix commented 2025-01-25 19:20:50 +00:00 (Migrated from gitlab2.manjaro.org)

changed the description

changed the description
phoepsilonix commented 2025-01-26 06:08:53 +00:00 (Migrated from gitlab2.manjaro.org)

packages/extra/manjaro-hello!14

packages/extra/manjaro-hello!14
phoepsilonix commented 2025-02-02 08:58:21 +00:00 (Migrated from gitlab2.manjaro.org)

added 2 commits

  • 70d880a4 - 1 commit from branch master
  • 77e2d4e7 - Merge branch 'master' into fix-segv

Compare with previous version

added 2 commits <ul><li>70d880a4 - 1 commit from branch <code>master</code></li><li>77e2d4e7 - Merge branch &#39;master&#39; into fix-segv</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4541&start_sha=23bfefd79b4c5d179bb821fbc33934b408433f77)
phoepsilonix commented 2025-02-02 09:26:23 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 2cf402b6 - pillow again

Compare with previous version

added 1 commit <ul><li>2cf402b6 - pillow again</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4542&start_sha=77e2d4e7909c9de558f55e8cc9c98e756e399962)
phoepsilonix commented 2025-02-06 15:38:46 +00:00 (Migrated from gitlab2.manjaro.org)

added 4 commits

  • d5105e45 - Revert "Add svg to pixbuf function using rsvg_converter(external commands)"
  • e7f95f66 - Revert "add import cairosvg"
  • cd04e1e8 - Revert "add svg_lock for thread safe"
  • 87846f43 - Revert "again: convert_svg_to_pixbuf"

Compare with previous version

added 4 commits <ul><li>d5105e45 - Revert &quot;Add svg to pixbuf function using rsvg_converter(external commands)&quot;</li><li>e7f95f66 - Revert &quot;add import cairosvg&quot;</li><li>cd04e1e8 - Revert &quot;add svg_lock for thread safe&quot;</li><li>87846f43 - Revert &quot;again: convert_svg_to_pixbuf&quot;</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4551&start_sha=2cf402b6954e07daebbdee95d635afec8036392a)
phoepsilonix commented 2025-02-06 15:44:33 +00:00 (Migrated from gitlab2.manjaro.org)

added 2 commits

  • 50371192 - remove icon_lock
  • fc3b8232 - Change Gtk.IconTheme.get_default().load_icon() to get_pixbuf().

Compare with previous version

added 2 commits <ul><li>50371192 - remove icon_lock</li><li>fc3b8232 - Change Gtk.IconTheme.get_default().load_icon() to get_pixbuf().</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4552&start_sha=87846f4397f9b8f31b262a2e5d23dcf1460479fe)
phoepsilonix commented 2025-02-06 15:46:38 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • ac14cab2 - Change Gtk.IconTheme.get_default().load_icon() to get_pixbuf().

Compare with previous version

added 1 commit <ul><li>ac14cab2 - Change Gtk.IconTheme.get_default().load_icon() to get_pixbuf().</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4553&start_sha=fc3b8232eaeff08ff151ff32e40ae787495bac06)
phoepsilonix commented 2025-02-06 15:51:55 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 4c9bc858 - remove try block

Compare with previous version

added 1 commit <ul><li>4c9bc858 - remove try block</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4554&start_sha=ac14cab219b685a69bd361b4a813ffb723e45002)
phoepsilonix commented 2025-02-06 15:55:41 +00:00 (Migrated from gitlab2.manjaro.org)

added 2 commits

  • f163b9a5 - again: convert_svg_to_pixbuf
  • 48ec4e3b - add ImageDraw

Compare with previous version

added 2 commits <ul><li>f163b9a5 - again: convert_svg_to_pixbuf</li><li>48ec4e3b - add ImageDraw</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4555&start_sha=4c9bc85813fd77f585db8c1f4c73015798bb248f)
phoepsilonix commented 2025-02-06 16:48:30 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 9f2ae8c1 - Add svg to pixbuf function using rsvg_converter(external commands)

Compare with previous version

added 1 commit <ul><li>9f2ae8c1 - Add svg to pixbuf function using rsvg_converter(external commands)</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4556&start_sha=48ec4e3b8d540b69fd183e25e7ff5193ab117785)
phoepsilonix commented 2025-02-07 14:43:31 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 564669b1 - Add svg to pixbuf function using rsvg_converter(external commands)

Compare with previous version

added 1 commit <ul><li>564669b1 - Add svg to pixbuf function using rsvg_converter(external commands)</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4557&start_sha=9f2ae8c194693ad72ae7195b6485229d817769c5)
phoepsilonix commented 2025-02-07 15:03:00 +00:00 (Migrated from gitlab2.manjaro.org)

added 2 commits

  • 70d880a4 - 1 commit from branch master
  • c0af770a - Add svg to pixbuf function using rsvg_converter(external commands)

Compare with previous version

added 2 commits <ul><li>70d880a4 - 1 commit from branch <code>master</code></li><li>c0af770a - Add svg to pixbuf function using rsvg_converter(external commands)</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4559&start_sha=564669b14d7d14cd6f0b4ed18887db87d84166ee)
phoepsilonix commented 2025-02-07 15:09:46 +00:00 (Migrated from gitlab2.manjaro.org)

resolved all threads

resolved all threads
phoepsilonix commented 2025-02-07 16:03:56 +00:00 (Migrated from gitlab2.manjaro.org)

changed the description

changed the description
phoepsilonix commented 2025-02-07 16:05:40 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 5c751b44 - Add svg to pixbuf function using rsvg-convert(external commands)

Compare with previous version

added 1 commit <ul><li>5c751b44 - Add svg to pixbuf function using rsvg-convert(external commands)</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4562&start_sha=c0af770a84f85307896b165b93e53b6fc4d21d93)
phoepsilonix commented 2025-02-07 16:06:58 +00:00 (Migrated from gitlab2.manjaro.org)

Change svg conversion process.
Instead of converting svg inside python, an external command is executed in a separate process to convert it to png, which is then converted to pixbuf. Use rsvg-convert, which is faster than cairosvg command.

rsvg-convert is included in package librsvg, which is required by appstream, gtk3, gtk4, etc., so it is expected that it is already installed.

By leaving the svg conversion to an external process and importing cairosvg instead of pillow, the SEGV no longer occurs in the environment at hand.

gdb --args python -m pdb /usr/bin/manjaro-application-utility
gdb --args python /usr/bin/manjaro-application-utility
gdb --args python -m pdb /usr/bin/manjaro-hello
gdb --args python /usr/bin/manjaro-hello

Repeatedly running manjaro-hello,manjaro-application-utility used to generate SEGV about 1 out of 3 to 10 times.
I believe this fix has improved the situation.

Addition

Combination of versions and commits that have been verified to work.
Manjaro-Hello 0.8.0 + cherry-pick

  # fix get_best_locale
  git cherry-pick -n 307c619ff2d9eb00e59452ab38da70f1c95cc816
  # Resolve "Readme and other PAGES do not load."
  git cherry-pick -n 308055dbdb258009af1fe5b90868914b86204aeb
  # More appropriate URL for mailing list.
  git cherry-pick -n baaa79ed52574436d574ee0f52fcba4c7f171c9c
  # Resolve "gtk stock icons are deprecated since 3.10." 
  git cherry-pick -n 1258ef184c81eac200cd6b170af96b2ffc20d4d9
  # Fixes due to removal of info_bar_appstream from application-utility
  git cherry-pick -n 2f9114c35d27d89faf5a8db3fe41b67997fe18eb

Manjaro-Application-Utility 1.4.1 + cherry-pick

  # Remove unused appstream info bar setup and related methods
  git cherry-pick 70d880a4d70949e060b1bfc99cec35e576594b32
  # Add svg to pixbuf function using rsvg-convert(external commands)
  git cherry-pick c0af770a84f85307896b165b93e53b6fc4d21d93
Change svg conversion process. Instead of converting svg inside python, an external command is executed in a separate process to convert it to png, which is then converted to pixbuf. Use rsvg-convert, which is faster than cairosvg command. rsvg-convert is included in package librsvg, which is required by appstream, gtk3, gtk4, etc., so it is expected that it is already installed. By leaving the svg conversion to an external process and importing cairosvg instead of pillow, the SEGV no longer occurs in the environment at hand. ```sh gdb --args python -m pdb /usr/bin/manjaro-application-utility gdb --args python /usr/bin/manjaro-application-utility gdb --args python -m pdb /usr/bin/manjaro-hello gdb --args python /usr/bin/manjaro-hello ``` Repeatedly running manjaro-hello,manjaro-application-utility used to generate SEGV about 1 out of 3 to 10 times. I believe this fix has improved the situation. # Addition Combination of versions and commits that have been verified to work. Manjaro-Hello 0.8.0 + cherry-pick ```sh # fix get_best_locale git cherry-pick -n 307c619ff2d9eb00e59452ab38da70f1c95cc816 # Resolve "Readme and other PAGES do not load." git cherry-pick -n 308055dbdb258009af1fe5b90868914b86204aeb # More appropriate URL for mailing list. git cherry-pick -n baaa79ed52574436d574ee0f52fcba4c7f171c9c # Resolve "gtk stock icons are deprecated since 3.10." git cherry-pick -n 1258ef184c81eac200cd6b170af96b2ffc20d4d9 # Fixes due to removal of info_bar_appstream from application-utility git cherry-pick -n 2f9114c35d27d89faf5a8db3fe41b67997fe18eb ``` Manjaro-Application-Utility 1.4.1 + cherry-pick ```sh # Remove unused appstream info bar setup and related methods git cherry-pick 70d880a4d70949e060b1bfc99cec35e576594b32 # Add svg to pixbuf function using rsvg-convert(external commands) git cherry-pick c0af770a84f85307896b165b93e53b6fc4d21d93 ```
phoepsilonix commented 2025-02-07 20:08:32 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • dfdd5959 - Add svg to pixbuf function using rsvg-convert(external commands)

Compare with previous version

added 1 commit <ul><li>dfdd5959 - Add svg to pixbuf function using rsvg-convert(external commands)</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4565&start_sha=5c751b4496e41c403404e55c9b0e570fdd3af8d0)
phoepsilonix commented 2025-02-07 20:33:44 +00:00 (Migrated from gitlab2.manjaro.org)

added 1 commit

  • 8c6cd8c7 - Add svg to pixbuf function using rsvg-convert(external commands)

Compare with previous version

added 1 commit <ul><li>8c6cd8c7 - Add svg to pixbuf function using rsvg-convert(external commands)</li></ul> [Compare with previous version](/applications/application-utility/-/merge_requests/15/diffs?diff_id=4572&start_sha=dfdd595994b5984cbe97426a709d849ca2860cb6)
phoepsilonix commented 2025-02-07 20:36:44 +00:00 (Migrated from gitlab2.manjaro.org)

requested review from @yochananmarqos1

requested review from @yochananmarqos1
yochananmarqos1 commented 2025-02-11 01:20:50 +00:00 (Migrated from gitlab2.manjaro.org)

@phoepsilonix Apparently this is ready now?

@fhdk Have you had a chance to look at it?

@phoepsilonix Apparently this is ready now? @fhdk Have you had a chance to look at it?
fhdk commented 2025-02-11 05:54:27 +00:00 (Migrated from gitlab2.manjaro.org)

I will take a look - I have been busy

I will take a look - I have been busy
phoepsilonix (Migrated from gitlab2.manjaro.org) closed this pull request 2025-12-21 04:36:43 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
applications/application-utility!26
No description provided.