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

hash-paths action path collisions in symbols table #877

Open
mkutlak opened this issue Feb 25, 2020 · 0 comments
Open

hash-paths action path collisions in symbols table #877

mkutlak opened this issue Feb 25, 2020 · 0 comments
Labels

Comments

@mkutlak
Copy link
Contributor

mkutlak commented Feb 25, 2020

From retrace.fp.org:

CRITICAL:faf:Action failed unexpectedly: IntegrityError: (IntegrityError) duplicate key value violates unique constraint "symbols_name_key"
DETAIL:  Key (name, normalized_path)=(java.util.TimerThread.mainLoop, /opt/189f40034be7a199f1fa9891668ee3ab6049f82d38c68be70f596eab2e1857b7) already exists.
 'UPDATE symbols SET normalized_path=%(normalized_path)s WHERE symbols.id = %(symbols_id)s' {'normalized_path': '/opt/189f40034be7a199f1fa9891668ee3ab6049f82d38c68be70f596eab2e1857b7', 'symbols_id': 810585}

faf hash-paths action can fail because of UniqueConstraint on name and normalized_path.

__table_args__ = (UniqueConstraint('name', 'normalized_path'),)

Example situation:

Before hash-paths call:

name normalized_path id
java.util.TimerThread.mainLoop /opt/jdk1.8.0_141/jre/lib/rt.jar 1
java.util.TimerThread.mainLoop /opt/java1.7/jre/lib/rt.jar 2

These would end up as:

name normalized_path id
java.util.TimerThread.mainLoop /opt/189f40034be7a199f1fa9891668ee3ab6049f82d38c68be70f596eab2e1857b7 1
java.util.TimerThread.mainLoop /opt/189f40034be7a199f1fa9891668ee3ab6049f82d38c68be70f596eab2e1857b7 2
@mkutlak mkutlak added the bug label Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant