Skip to content

hash-paths action path collisions in symbols table #877

Open
@mkutlak

Description

@mkutlak

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions