Skip to content

[ADI-3553] Clean up module if mmap error occured - #13

Closed
HirakawaTakara wants to merge 4 commits into
mainfrom
feature/add_file_unlink_error_mmap
Closed

[ADI-3553] Clean up module if mmap error occured#13
HirakawaTakara wants to merge 4 commits into
mainfrom
feature/add_file_unlink_error_mmap

Conversation

@HirakawaTakara

Copy link
Copy Markdown
Contributor

What?

Clean up module if mmap error occured.

Why?

When an error occurs with mmap, the module information remains, so I added a call to plat_mod_fs_file_unlink() to perform cleanup.

@github-actions

github-actions Bot commented Dec 10, 2025

Copy link
Copy Markdown

Python Application SDK

EVP Python Application SDK coverage report
FileStmtsMissCoverMissing
evp/app
   __init__.py00100% 
   backend.py884153%29–35, 41, 58–60, 90, 131, 170–171, 173, 201–202, 204, 231–232, 234, 260–261, 263, 290–291, 293, 325–326, 328, 370–371, 373–374, 376, 412, 448, 466, 486, 525
   blob.py1341489%54, 79, 82, 137, 221, 263–264, 272–278
   client.py34294%31, 35
   command.py450100% 
   configuration.py80100% 
   exceptions.py34197%23
   executor.py45295%43, 46
   state.py60100% 
   telemetry.py60100% 
TOTAL4006085% 

Python Application SDK test report

Tests Skipped Failures Errors Time
21 0 💤 0 ❌ 0 🔥 1.348s ⏱️

@HirakawaTakara
HirakawaTakara marked this pull request as ready for review December 10, 2025 05:31
Comment thread src/libevp-agent/platform.c Outdated
if (fstat(fd, &sb) == -1) {
*error = errno;
xlog_error("%s: error on stat: %d", __func__, *error);
xlog_error("%s: error on stat %s(%d): %d", __func__, filename,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If "*error" is "errno," please write it as "errno =".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for confirming. I have adjusted the message to "errno=%d".
7a4b290

Comment thread src/libevp-agent/platform.c Outdated
if (addr == MAP_FAILED) {
*error = errno;
xlog_error("%s: error on mmap: %d", __func__, errno);
xlog_error("%s: error on mmap %s(%d): %d, st_size=%zu",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please set it to "errno = %d".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have adjusted the message to "errno=%d".
7a4b290

@ryotabando ryotabando left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread src/libevp-agent/module_impl_obj.c Outdated
return EINVAL;
}
} else if (ret != ENOENT) {
/* Cleaned up the module if some IO error occurs. */

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is Cleaned typo? I think Clean is correct because Cleaned is in the past tense.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for confirming. I fixed the typo.
5b644f6

@HirakawaTakara
HirakawaTakara deleted the feature/add_file_unlink_error_mmap branch December 12, 2025 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants