Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C functions module reloading is not restoring functions properly #5968

Closed
cyrillos opened this issue Apr 6, 2021 · 4 comments
Closed

C functions module reloading is not restoring functions properly #5968

cyrillos opened this issue Apr 6, 2021 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@cyrillos
Copy link
Contributor

cyrillos commented Apr 6, 2021

In the commit 96938fa restore of old functions is simply broken. I made a test which makes tarantool to crash. Actually the code is highly bounded to my series in #4642 thus need to fix it in the scope to not double efforts.

@cyrillos cyrillos added the bug Something isn't working label Apr 6, 2021
@cyrillos cyrillos self-assigned this Apr 6, 2021
@Gerold103
Copy link
Collaborator

You should fix it separately (before 4642 commits) at least to be able to cherry-pick it to 1.10.

@cyrillos
Copy link
Contributor Author

cyrillos commented Apr 6, 2021

You should fix it separately (before 4642 commits) at least to be able to cherry-pick it to 1.10.

Sure but my #4642 depends on it as I already mentioned. So I fix it in scope of the #4642 bug but as separate commit.

cyrillos added a commit that referenced this issue Apr 8, 2021
In commit 96938fa (Add hot function reload for C procedures)
an ability to hot reload of modules has been introduced.
When module is been reloaded his functions are resolved to
new symbols but if something went wrong it is supposed
to restore old symbols from the old module.

Actually current code restores only one function and may
crash if there a bunch of functions to restore. Lets fix it.

Fixes #5968

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
cyrillos added a commit that referenced this issue Apr 10, 2021
In commit 96938fa (Add hot function reload for C procedures)
an ability to hot reload of modules has been introduced.
When module is been reloaded his functions are resolved to
new symbols but if something went wrong it is supposed
to restore old symbols from the old module.

Actually current code restores only one function and may
crash if there a bunch of functions to restore. Lets fix it.

Fixes #5968

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
cyrillos added a commit that referenced this issue Apr 12, 2021
In commit 96938fa (Add hot function reload for C procedures)
an ability to hot reload of modules has been introduced.
When module is been reloaded his functions are resolved to
new symbols but if something went wrong it is supposed
to restore old symbols from the old module.

Actually current code restores only one function and may
crash if there a bunch of functions to restore. Lets fix it.

Fixes #5968

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
@Gerold103
Copy link
Collaborator

It must be pushed to all the supported branches, because it is a bugfix.

@Gerold103 Gerold103 reopened this Apr 14, 2021
@kyukhin kyukhin added the teamS label Jul 14, 2021
@kyukhin kyukhin added this to the wishlist milestone Jul 14, 2021
cyrillos added a commit that referenced this issue Jul 14, 2021
In commit 96938fa (Add hot function reload for C procedures)
an ability to hot reload of modules has been introduced.
When module is been reloaded his functions are resolved to
new symbols but if something went wrong it is supposed
to restore old symbols from the old module.

Actually current code restores only one function and may
crash if there a bunch of functions to restore. Lets fix it.

Fixes #5968

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
cyrillos added a commit that referenced this issue Jul 14, 2021
In commit 96938fa (Add hot function reload for C procedures)
an ability to hot reload of modules has been introduced.
When module is been reloaded his functions are resolved to
new symbols but if something went wrong it is supposed
to restore old symbols from the old module.

Actually current code restores only one function and may
crash if there a bunch of functions to restore. Lets fix it.

Fixes #5968

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
@cyrillos
Copy link
Contributor Author

@kyukhin for 2.7 series gorcunov/gh-5968-func-restore-2.7, 2.8 already has the fix. For 1.10 series I had to rewrite tests, pushed into gorcunov/gh-5968-func-restore-1.10. Lets wait the tests to pass.

kyukhin pushed a commit that referenced this issue Jul 15, 2021
In commit 96938fa (Add hot function reload for C procedures)
an ability to hot reload of modules has been introduced.
When module is been reloaded his functions are resolved to
new symbols but if something went wrong it is supposed
to restore old symbols from the old module.

Actually current code restores only one function and may
crash if there a bunch of functions to restore. Lets fix it.

Fixes #5968

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>

(cherry-picked from b9f2bf4)
kyukhin pushed a commit that referenced this issue Jul 15, 2021
In commit 96938fa (Add hot function reload for C procedures)
an ability to hot reload of modules has been introduced.
When module is been reloaded his functions are resolved to
new symbols but if something went wrong it is supposed
to restore old symbols from the old module.

Actually current code restores only one function and may
crash if there a bunch of functions to restore. Lets fix it.

Fixes #5968

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>

(cherry-picked from 39370f3)
@kyukhin kyukhin closed this as completed Jul 15, 2021
@kyukhin kyukhin modified the milestones: wishlist, 2.8.2 Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants